Class ByteStreamReadingMessageSource

All Implemented Interfaces:
Aware, BeanFactoryAware, BeanNameAware, DisposableBean, InitializingBean, MessageSource<byte[]>, IntegrationPattern, NamedComponent, IntegrationInboundManagement, IntegrationManagement

public class ByteStreamReadingMessageSource extends AbstractMessageSource<byte[]>
A pollable source for receiving bytes from an InputStream.
Author:
Mark Fisher, Artem Bilan, Christian Tzolov, Ngoc Nhan
  • Constructor Details

    • ByteStreamReadingMessageSource

      public ByteStreamReadingMessageSource(InputStream stream)
    • ByteStreamReadingMessageSource

      public ByteStreamReadingMessageSource(InputStream stream, int bufferSize)
  • Method Details

    • setBytesPerMessage

      public void setBytesPerMessage(int bytesPerMessage)
    • setShouldTruncate

      public void setShouldTruncate(boolean shouldTruncate)
    • getComponentType

      public String getComponentType()
    • doReceive

      protected byte[] doReceive()
      Description copied from class: AbstractMessageSource
      Subclasses must implement this method. Typically the returned value will be the payload of type T, but the returned value may also be a Message instance whose payload is of type T; also can be AbstractIntegrationMessageBuilder which is used for additional headers population.
      Specified by:
      doReceive in class AbstractMessageSource<byte[]>
      Returns:
      The value returned.