|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DNAEncoding
Defines how to encode DNA onto a stream or decode data from a stream, with some different policies for encoding.
| Field Summary | |
|---|---|
static byte |
APPLICATOR
When the policy is set to APPLICATOR then the DNAEncoding.decode() will return the original Objects that were encoded in the original stream. |
static byte |
SERIALIZER
When the policy is set to SERIALIZER then the DNAEncoding.decode() will return the exact Objects that where encoded. |
static byte |
STORAGE
When the policy is set to STORAGE then the DNAEncoding.decode() may return Objects that represent the original objects for performance/memory. |
| Method Summary | |
|---|---|
java.lang.Object |
decode(TCDataInput input)
Decode an object from an input stream |
void |
encode(java.lang.Object value,
TCDataOutput output)
Encode an object onto an output stream |
void |
encodeArray(java.lang.Object value,
TCDataOutput output)
Encode an array onto an output stream, automatically determine array length |
void |
encodeArray(java.lang.Object value,
TCDataOutput output,
int length)
Encode an array onto an output stream |
void |
encodeClassLoader(java.lang.ClassLoader value,
TCDataOutput output)
Encode a classloader object onto an output stream |
| Field Detail |
|---|
static final byte SERIALIZER
You may want such a policy in TCObjectInputStream, for example.
static final byte STORAGE
As the name says, you may want such a policy for storage in the L2.
static final byte APPLICATOR
You may want such a policy in TCObjectInputStream, for example.
| Method Detail |
|---|
void encodeClassLoader(java.lang.ClassLoader value,
TCDataOutput output)
value - The classloaderoutput - The output
void encode(java.lang.Object value,
TCDataOutput output)
value - The objectoutput - The output
java.lang.Object decode(TCDataInput input)
throws java.io.IOException,
java.lang.ClassNotFoundException
input - The input stream
java.io.IOException
java.lang.ClassNotFoundException
void encodeArray(java.lang.Object value,
TCDataOutput output)
value - The arrayoutput - The output
void encodeArray(java.lang.Object value,
TCDataOutput output,
int length)
value - The arrayoutput - The outputlength - The length of the array to encode
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||