Interface Decoder
All Packages Class Hierarchy This Package Previous Next Index
Interface Decoder
public interface netscape.util.Decoder
{
/* Methods
*/
public abstract boolean decodeBoolean(String);
public abstract boolean[] decodeBooleanArray(String);
public abstract byte decodeByte(String);
public abstract byte[] decodeByteArray(String);
public abstract char decodeChar(String);
public abstract char[] decodeCharArray(String);
public abstract double decodeDouble(String);
public abstract double[] decodeDoubleArray(String);
public abstract float decodeFloat(String);
public abstract float[] decodeFloatArray(String);
public abstract int decodeInt(String);
public abstract int[] decodeIntArray(String);
public abstract long decodeLong(String);
public abstract long[] decodeLongArray(String);
public abstract Object decodeObject(String);
public abstract Object[] decodeObjectArray(String);
public abstract short decodeShort(String);
public abstract short[] decodeShortArray(String);
public abstract String decodeString(String);
public abstract String[] decodeStringArray(String);
public abstract void replaceObject(Object);
public abstract int versionForClassName(String);
}
The Decoder interface describes the API through which objects decode
their essential state as a set of key-value pairs. Unarchiver implements
this API to decode the state of a graph of objects from an Archive.
- See Also:
- Codable, Encoder, Unarchiver, Archive
Methods
public abstract int versionForClassName(String className) throws CodingException
- Returns the version information for the class named className.
Objects can use this information to bring forward old encodings at
runtime.
public abstract boolean decodeBoolean(String key) throws CodingException
- Decodes the boolean value associated with the string key.
public abstract boolean[] decodeBooleanArray(String key) throws CodingException
- Decodes the boolean array associated with the string key.
public abstract char decodeChar(String key) throws CodingException
- Decodes the character value associated with the string key.
public abstract char[] decodeCharArray(String key) throws CodingException
- Decodes the character array associated with the string key.
public abstract byte decodeByte(String key) throws CodingException
- Decodes the byte value associated with the string key.
public abstract byte[] decodeByteArray(String key) throws CodingException
- Decodes the byte array associated with the string key.
public abstract short decodeShort(String key) throws CodingException
- Decodes the short value associated with the string key.
public abstract short[] decodeShortArray(String key) throws CodingException
- Decodes the short array associated with the string key.
public abstract int decodeInt(String key) throws CodingException
- Decodes the integer value associated with the string key.
public abstract int[] decodeIntArray(String key) throws CodingException
- Decodes the integer array associated with the string key.
public abstract long decodeLong(String key) throws CodingException
- Decodes the long value associated with the string key.
public abstract long[] decodeLongArray(String key) throws CodingException
- Decodes the long array value associated with the string key.
public abstract float decodeFloat(String key) throws CodingException
- Decodes the float value associated with the string key.
public abstract float[] decodeFloatArray(String key) throws CodingException
- Decodes the float array associated with the string key.
public abstract double decodeDouble(String key) throws CodingException
- Decodes the double value associated with the string key.
public abstract double[] decodeDoubleArray(String key) throws CodingException
- Decodes the double array associated with the string key.
public abstract String decodeString(String key) throws CodingException
- Decodes the string value associated with the string key.
public abstract String[] decodeStringArray(String key) throws CodingException
- Decodes the string array associated with the string key.
public abstract Object decodeObject(String key) throws CodingException
- Decodes a reference to another Codable object.
public abstract Object[] decodeObjectArray(String key) throws CodingException
- Decodes an array of Codable objects. The references to the Codable
objects are shared, but the reference to the array is not.
public abstract void replaceObject(Object replacement) throws CodingException
- Replaces references to the object currently being decoded with
replacement. This method throws a CodingException when an
attempt is made to replace an object which has already been seen
by other objects. For maximum safety, this method should only be
called from leaves of the object graph.
All Packages Class Hierarchy This Package Previous Next Index
Copyright © 1997 Netscape Communications Corporation. All rights reserved
Please send any comments or corrections to ifcfeedback@netscape.com
HTML generated on 21 Oct 1997