public class StructWriter
extends java.lang.Object
Constructor and Description |
---|
StructWriter()
Construct instance of StructWriter with default buffer size.
|
StructWriter(int bufsiz)
Construct instance of StructWriter.
|
Modifier and Type | Method and Description |
---|---|
void |
extend(int newbufsiz)
Extend capacity.
|
byte[] |
getBytes()
Get bytes.
|
int |
getLength()
Get length.
|
void |
write(java.lang.Object o)
Write.
|
void |
write(java.lang.Object o,
InfoProvider lenpvd)
Write.
|
void |
write(java.lang.Object o,
LengthProvider lenpvd)
Write.
|
void |
write(java.lang.Object o,
LengthProvider2 lenpvd)
Write.
|
public StructWriter()
public StructWriter(int bufsiz)
bufsiz
- size of byte array to write topublic void write(java.lang.Object o) throws RecordException
o
- object to writeRecordException
- if impossible to convert between types in class and structpublic void write(java.lang.Object o, LengthProvider lenpvd) throws RecordException
o
- object to writelenpvd
- 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 void write(java.lang.Object o, LengthProvider2 lenpvd) throws RecordException
o
- object to writelenpvd
- 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 void write(java.lang.Object o, InfoProvider lenpvd) throws RecordException
o
- object to writelenpvd
- 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 byte[] getBytes()
public int getLength()
public void extend(int newbufsiz)
newbufsiz
- new size of byte array to write to