Spring Integration

org.springframework.integration.stream
Class ByteStreamReadingMessageSource

java.lang.Object
  extended by 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

Constructor Summary
ByteStreamReadingMessageSource(java.io.InputStream stream)
           
ByteStreamReadingMessageSource(java.io.InputStream stream, int bufferSize)
           
 
Method Summary
 Message<byte[]> receive()
          Retrieve the next available message from this source.
 void setBytesPerMessage(int bytesPerMessage)
           
 void setShouldTruncate(boolean shouldTruncate)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteStreamReadingMessageSource

public ByteStreamReadingMessageSource(java.io.InputStream stream)

ByteStreamReadingMessageSource

public ByteStreamReadingMessageSource(java.io.InputStream stream,
                                      int bufferSize)
Method Detail

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[]>

Spring Integration