Class ByteArrayConsumerImpl

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.refcodes.structure.ByteArrayAccessor

        org.refcodes.structure.ByteArrayAccessor.ByteArrayBuilder<B extends org.refcodes.structure.ByteArrayAccessor.ByteArrayBuilder<B>>, org.refcodes.structure.ByteArrayAccessor.ByteArrayMutator, org.refcodes.structure.ByteArrayAccessor.ByteArrayProperty
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] getBytes​()
      Provides access to the consumed bytes as byte array.
      void writeDatagram​(byte aDatagram)
      Writes (sends) a byte.
      void writeDatagrams​(byte[] aDatagrams, int aOffset, int aLength)
      Writes (sends) a byte block.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ByteArrayConsumerImpl

        public ByteArrayConsumerImpl​()
    • Method Detail

      • writeDatagram

        public void writeDatagram​(byte aDatagram)
                           throws org.refcodes.component.OpenException
        Writes (sends) a byte.
        Specified by:
        writeDatagram in interface ByteConsumer
        Specified by:
        writeDatagram in interface ByteDatagramConsumer
        Parameters:
        aDatagram - The byte to be pushed.
        Throws:
        org.refcodes.component.OpenException - Thrown in case opening or accessing an open line (connection, junction, link) caused problems.
      • writeDatagrams

        public void writeDatagrams​(byte[] aDatagrams,
                                   int aOffset,
                                   int aLength)
                            throws org.refcodes.component.OpenException
        Writes (sends) a byte block.
        Specified by:
        writeDatagrams in interface ByteBlockConsumer
        Parameters:
        aDatagrams - 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:
        org.refcodes.component.OpenException - Thrown in case opening or accessing an open line (connection, junction, link) caused problems.
      • getBytes

        public byte[] getBytes​()
        Provides access to the consumed bytes as byte array.
        Specified by:
        getBytes in interface org.refcodes.structure.ByteArrayAccessor
        Specified by:
        getBytes in interface ByteArrayConsumer
        Returns:
        The consumed bytes as byte array.