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.
|
<T> void |
read(T o)
Read.
|
<T> void |
read(T o,
InfoProvider lenpvd)
Read.
|
<T> void |
read(T o,
LengthProvider lenpvd)
Read.
|
<T> void |
read(T o,
LengthProvider2 lenpvd)
Read.
|
<T> java.util.Map<java.lang.String,java.lang.Object> |
readMap(java.lang.Class<T> t)
Read map.
|
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 <T> java.util.Map<java.lang.String,java.lang.Object> readMap(java.lang.Class<T> t)
throws RecordException
T - struct typet - class of what to readRecordException - if impossible to convert between types in msp and structpublic boolean more()
public int getRemaining()
public void update(byte[] ba)
ba - bytes to addpublic <T> void read(T o)
throws RecordException
T - struct typeo - object to be filledRecordException - if impossible to convert between types in class and structpublic <T> void read(T o,
LengthProvider lenpvd)
throws RecordException
T - struct typeo - object to be filledlenpvd - 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> void read(T o,
LengthProvider2 lenpvd)
throws RecordException
T - struct typeo - object to be filledlenpvd - 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> void read(T o,
InfoProvider lenpvd)
throws RecordException
T - struct typeo - object to be filledlenpvd - 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 struct