org.springframework.integration.adapter.stream
Class ByteStreamSource
java.lang.Object
org.springframework.integration.adapter.stream.ByteStreamSource
- All Implemented Interfaces:
- Source<byte[]>
public class ByteStreamSource
- extends java.lang.Object
- implements Source<byte[]>
A pollable source for receiving bytes from an InputStream
.
- Author:
- Mark Fisher
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
stream
private java.io.BufferedInputStream stream
streamMonitor
private java.lang.Object streamMonitor
bytesPerMessage
private int bytesPerMessage
shouldTruncate
private boolean shouldTruncate
ByteStreamSource
public ByteStreamSource(java.io.InputStream stream)
ByteStreamSource
public ByteStreamSource(java.io.InputStream stream,
int bufferSize)
setBytesPerMessage
public void setBytesPerMessage(int bytesPerMessage)
setShouldTruncate
public void setShouldTruncate(boolean shouldTruncate)
receive
public Message<byte[]> receive()
- Description copied from interface:
Source
- Retrieve a message from this source or
null
if no message is available.
- Specified by:
receive
in interface Source<byte[]>