public class StructReader
extends java.lang.Object
Constructor and Description |
---|
StructReader(byte[] ba)
Create instance of StructReader.
|
Modifier and Type | Method and Description |
---|---|
int |
getRemaining()
Get number of remaining bytes.
|
boolean |
more()
More records available.
|
<T> T |
read(java.lang.Class<T> t)
Read.
|
<T> T |
read(java.lang.Class<T> t,
InfoProvider lenpvd)
Read.
|
<T> T |
read(java.lang.Class<T> t,
LengthProvider lenpvd)
Read.
|
<T> T |
read(java.lang.Class<T> t,
LengthProvider2 lenpvd)
Read.
|
void |
update(byte[] ba)
Update byte array to read from by adding bytes.
|
public StructReader(byte[] ba)
ba
- byte array to read frompublic <T> T read(java.lang.Class<T> t) throws RecordException
T
- struct typet
- class of what to readRecordException
- if impossible to convert between types in class and structpublic <T> T read(java.lang.Class<T> t, LengthProvider lenpvd) throws RecordException
T
- struct typet
- class of what to readlenpvd
- supplies length for fields where it is not given (null indicates that it is to be ignored)RecordException
- if impossible to convert between types in class and structpublic <T> T read(java.lang.Class<T> t, LengthProvider2 lenpvd) throws RecordException
T
- struct typet
- class of what to readlenpvd
- supplies length for fields where it is not given (null indicates that it is to be ignored)RecordException
- if impossible to convert between types in class and structpublic <T> T read(java.lang.Class<T> t, InfoProvider lenpvd) throws RecordException
T
- struct typet
- class of what to readlenpvd
- supplies various length'es where they are not given (null indicates that it is to be ignored)RecordException
- if impossible to convert between types in class and structpublic boolean more()
public int getRemaining()
public void update(byte[] ba)
ba
- bytes to add