org.springframework.integration.stream
Class ByteStreamReadingMessageSource
java.lang.Object
org.springframework.integration.stream.ByteStreamReadingMessageSource
- All Implemented Interfaces:
- MessageSource<byte[]>
public class ByteStreamReadingMessageSource
- extends java.lang.Object
- implements MessageSource<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 |
ByteStreamReadingMessageSource
public ByteStreamReadingMessageSource(java.io.InputStream stream)
ByteStreamReadingMessageSource
public ByteStreamReadingMessageSource(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:
MessageSource
- Retrieve the next available message from this source.
Returns
null
if no message is available.
- Specified by:
receive
in interface MessageSource<byte[]>