Package org.refcodes.io
Class ByteArrayConsumerImpl
- java.lang.Object
-
- org.refcodes.io.ByteArrayConsumerImpl
-
- All Implemented Interfaces:
ByteArrayConsumer,ByteBlockConsumer,ByteConsumer,ByteDatagramConsumer,org.refcodes.structure.ByteArrayAccessor
public class ByteArrayConsumerImpl extends java.lang.Object implements ByteArrayConsumer
The 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
-
-
Constructor Summary
Constructors Constructor Description ByteArrayConsumerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getBytes()Provides access to the consumed bytes as byte array.voidwriteDatagram(byte aDatagram)Writes (sends) a byte.voidwriteDatagrams(byte[] aDatagrams, int aOffset, int aLength)Writes (sends) a byte block.-
Methods inherited from interface org.refcodes.io.ByteConsumer
writeDatagrams
-
-
-
-
Method Detail
-
writeDatagram
public void writeDatagram(byte aDatagram) throws org.refcodes.component.OpenExceptionWrites (sends) a byte.- Specified by:
writeDatagramin interfaceByteConsumer- Specified by:
writeDatagramin interfaceByteDatagramConsumer- 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.OpenExceptionWrites (sends) a byte block.- Specified by:
writeDatagramsin interfaceByteBlockConsumer- 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:
getBytesin interfaceorg.refcodes.structure.ByteArrayAccessor- Specified by:
getBytesin interfaceByteArrayConsumer- Returns:
- The consumed bytes as byte array.
-
-