|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.vajhoej.record.StructWriter
public class StructWriter
Class StructWriter writes a Java object to a byte array as a native struct.
Constructor Summary | |
---|---|
StructWriter()
Construct instance of StructWriter with default buffer size. |
|
StructWriter(int bufsiz)
Construct instance of StructWriter. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StructWriter()
public StructWriter(int bufsiz)
bufsiz
- size of byte array to write toMethod Detail |
---|
public void write(java.lang.Object o) throws RecordException
o
- object to write
RecordException
- 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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |