| com.tc.object.dna.api.DNAEncoding
All known Subclasses: com.tc.object.dna.impl.DNAEncodingImpl,
DNAEncoding | public interface DNAEncoding (Code) | | Defines how to encode DNA onto a stream or decode data from a stream, with some different policies for encoding.
|
Field Summary | |
final public 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. | final public static byte | SERIALIZER When the policy is set to SERIALIZER then the DNAEncoding.decode() will return the exact Objects that where
encoded. | final public 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. |
APPLICATOR | final public static byte APPLICATOR(Code) | | When the policy is set to APPLICATOR then the DNAEncoding.decode() will return the original Objects that were
encoded in the original stream. For Example if UTF8ByteDataHolder is serialized to a stream, then when it is
deserialized, you get a String object.
You may want such a policy in TCObjectInputStream, for example.
|
SERIALIZER | final public static byte SERIALIZER(Code) | | When the policy is set to SERIALIZER then the DNAEncoding.decode() will return the exact Objects that where
encoded. For Example if UTF8ByteDataHolder is serialized to a stream, then when it is deserialized, you get an
UTF8ByteDataHolder object. Same goes for String or ClassHolder etc.
You may want such a policy in TCObjectInputStream, for example.
|
STORAGE | final public static byte STORAGE(Code) | | When the policy is set to STORAGE then the DNAEncoding.decode() may return Objects that represent the original
objects for performance/memory. For Example if String is serialized to a stream, then when it is deserialized, you
may get UTF8ByteDataHolder instead.
As the name says, you may want such a policy for storage in the L2.
|
encode | abstract public void encode(Object value, TCDataOutput output)(Code) | | Encode an object onto an output stream
Parameters: value - The object Parameters: output - The output |
encodeArray | abstract public void encodeArray(Object value, TCDataOutput output)(Code) | | Encode an array onto an output stream, automatically determine array length
Parameters: value - The array Parameters: output - The output |
encodeArray | abstract public void encodeArray(Object value, TCDataOutput output, int length)(Code) | | Encode an array onto an output stream
Parameters: value - The array Parameters: output - The output Parameters: length - The length of the array to encode |
encodeClassLoader | abstract public void encodeClassLoader(Object value, TCDataOutput output)(Code) | | Encode a classloader object onto an output stream
Parameters: value - The classloader Parameters: output - The output |
getPolicy | abstract public byte getPolicy()(Code) | | Get the policy in use for this encoding, as defined by constants in this class.
The policy |
|
|