Interface BytesSource

All Superinterfaces:
ByteSource
All Known Subinterfaces:
BidirectionalConnectionByteTransceiver<INPUT,OUTPUT>, BidirectionalStreamConnectionByteTransceiver, BytesTransceiver, BytesTransmitter, ConnectionBytesTransceiver<CON>, ConnectionBytesTransmitter<CON>
All Known Implementing Classes:
AbstractBytesTransmitter, BidirectionalStreamByteTransceiver, BidirectionalStreamConnectionByteTransceiverImpl, ByteArraySource, ByteTransmitterDecorator, LoopbackBytesTransceiver, LoopbackBytesTransmitter, OutputStreamBytesTransmitter, OutputStreamConnectionBytesTransmitter, PrefetchBidirectionalStreamByteTransceiver, PrefetchBidirectionalStreamConnectionByteTransceiver
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface BytesSource extends ByteSource
The BytesSource is used to send byte blocks (arrays) in a unified way.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    transmitByte(byte aByte)
    Writes (sends) a byte.
    default void
    transmitBytes(byte[] aBytes)
    Writes (sends) a byte block.
    void
    transmitBytes(byte[] aBytes, int aOffset, int aLength)
    Writes (sends) a byte block.
  • Method Details

    • transmitByte

      default void transmitByte(byte aByte) throws IOException
      Writes (sends) a byte.
      Specified by:
      transmitByte in interface ByteSource
      Parameters:
      aByte - The byte to be pushed.
      Throws:
      IOException - Thrown in case opening or accessing an open line (connection, junction, link) caused problems.
    • transmitBytes

      default void transmitBytes(byte[] aBytes) throws IOException
      Writes (sends) a byte block.
      Parameters:
      aBytes - The byte to be pushed.
      Throws:
      IOException - Thrown in case opening or accessing an open line (connection, junction, link) caused problems.
    • transmitBytes

      void transmitBytes(byte[] aBytes, int aOffset, int aLength) throws IOException
      Writes (sends) a byte block.
      Parameters:
      aBytes - The byte to be pushed.
      aOffset - The offset from which to take the data.
      aLength - The number of elements to push starting at the given offset.
      Throws:
      IOException - Thrown in case opening or accessing an open line (connection, junction, link) caused problems.