- java.lang.Object
-
- org.refcodes.io.ByteArraySource
-
- All Implemented Interfaces:
ByteSource
,BytesSource
,org.refcodes.struct.ByteArrayAccessor
public class ByteArraySource extends Object implements BytesSource, org.refcodes.struct.ByteArrayAccessor
The Class ByteArraySource.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.struct.ByteArrayAccessor
org.refcodes.struct.ByteArrayAccessor.ByteArrayBuilder<B extends org.refcodes.struct.ByteArrayAccessor.ByteArrayBuilder<B>>, org.refcodes.struct.ByteArrayAccessor.ByteArrayMutator, org.refcodes.struct.ByteArrayAccessor.ByteArrayProperty
-
-
Constructor Summary
Constructors Constructor Description ByteArraySource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getBytes()
void
transmitByte(byte aByte)
Writes (sends) a byte.void
transmitBytes(byte[] aBytes, 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
-
Methods inherited from interface org.refcodes.io.BytesSource
transmitAllBytes
-
-
-
-
Method Detail
-
transmitByte
public void transmitByte(byte aByte) throws IOException
Writes (sends) a byte.- Specified by:
transmitByte
in interfaceByteSource
- Specified by:
transmitByte
in interfaceBytesSource
- Parameters:
aByte
- The byte to be pushed.- Throws:
IOException
- Thrown in case opening or accessing an open line (connection, junction, link) caused problems.
-
transmitBytes
public void transmitBytes(byte[] aBytes, int aOffset, int aLength) throws IOException
Writes (sends) a byte block.- Specified by:
transmitBytes
in interfaceBytesSource
- 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.
-
getBytes
public byte[] getBytes()
- Specified by:
getBytes
in interfaceorg.refcodes.struct.ByteArrayAccessor
-
-