Package org.refcodes.io
Class ByteArrayProviderImpl
- java.lang.Object
-
- org.refcodes.io.AbstractByteProvider
-
- org.refcodes.io.ByteArrayProviderImpl
-
- All Implemented Interfaces:
ByteArrayProvider
,ByteBlockProvider
,ByteDatagramProvider
,ByteProvider
,org.refcodes.structure.ByteArrayAccessor
public class ByteArrayProviderImpl extends AbstractByteProvider implements ByteArrayProvider
The Class ByteArrayProviderImpl.
-
-
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
-
-
Field Summary
-
Fields inherited from class org.refcodes.io.AbstractByteProvider
_datagramQueue, DATAGRAM_QUEUE_SIZE
-
-
Constructor Summary
Constructors Constructor Description ByteArrayProviderImpl(byte[] aDatagrams)
Instantiates a new byte array provider impl.ByteArrayProviderImpl(java.util.List<java.lang.Byte> aDatagrams)
Instantiates a new byte array provider impl.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getBytes()
Provides access to the remaining backing byte array.-
Methods inherited from class org.refcodes.io.AbstractByteProvider
pushDatagram, pushDatagrams, pushDatagrams, readDatagram, readDatagrams, readDatagrams
-
Methods inherited from interface org.refcodes.io.ByteDatagramProvider
readDatagram
-
Methods inherited from interface org.refcodes.io.ByteProvider
readDatagrams, readDatagrams
-
-
-
-
Constructor Detail
-
ByteArrayProviderImpl
public ByteArrayProviderImpl(byte[] aDatagrams)
Instantiates a new byte array provider impl.- Parameters:
aDatagrams
- the datagrams
-
ByteArrayProviderImpl
public ByteArrayProviderImpl(java.util.List<java.lang.Byte> aDatagrams)
Instantiates a new byte array provider impl.- Parameters:
aDatagrams
- the datagrams
-
-
Method Detail
-
getBytes
public byte[] getBytes()
Provides access to the remaining backing byte array. All read data via methods such asByteDatagramProvider.readDatagram()
orByteProvider.readDatagrams(int)
are not contained in the returned array.- Specified by:
getBytes
in interfaceorg.refcodes.structure.ByteArrayAccessor
- Specified by:
getBytes
in interfaceByteArrayProvider
- Returns:
- The remaining backing byte array.
-
-