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.void
writeDatagram(byte aDatagram)
Writes (sends) a byte.void
writeDatagrams(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.OpenException
Writes (sends) a byte.- Specified by:
writeDatagram
in interfaceByteConsumer
- Specified by:
writeDatagram
in 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.OpenException
Writes (sends) a byte block.- Specified by:
writeDatagrams
in 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:
getBytes
in interfaceorg.refcodes.structure.ByteArrayAccessor
- Specified by:
getBytes
in interfaceByteArrayConsumer
- Returns:
- The consumed bytes as byte array.
-
-