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

versionForClassName

  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.

decodeBoolean

  public abstract boolean decodeBoolean(String key) throws CodingException
Decodes the boolean value associated with the string key.

decodeBooleanArray

  public abstract boolean[] decodeBooleanArray(String key) throws CodingException
Decodes the boolean array associated with the string key.

decodeChar

  public abstract char decodeChar(String key) throws CodingException
Decodes the character value associated with the string key.

decodeCharArray

  public abstract char[] decodeCharArray(String key) throws CodingException
Decodes the character array associated with the string key.

decodeByte

  public abstract byte decodeByte(String key) throws CodingException
Decodes the byte value associated with the string key.

decodeByteArray

  public abstract byte[] decodeByteArray(String key) throws CodingException
Decodes the byte array associated with the string key.

decodeShort

  public abstract short decodeShort(String key) throws CodingException
Decodes the short value associated with the string key.

decodeShortArray

  public abstract short[] decodeShortArray(String key) throws CodingException
Decodes the short array associated with the string key.

decodeInt

  public abstract int decodeInt(String key) throws CodingException
Decodes the integer value associated with the string key.

decodeIntArray

  public abstract int[] decodeIntArray(String key) throws CodingException
Decodes the integer array associated with the string key.

decodeLong

  public abstract long decodeLong(String key) throws CodingException
Decodes the long value associated with the string key.

decodeLongArray

  public abstract long[] decodeLongArray(String key) throws CodingException
Decodes the long array value associated with the string key.

decodeFloat

  public abstract float decodeFloat(String key) throws CodingException
Decodes the float value associated with the string key.

decodeFloatArray

  public abstract float[] decodeFloatArray(String key) throws CodingException
Decodes the float array associated with the string key.

decodeDouble

  public abstract double decodeDouble(String key) throws CodingException
Decodes the double value associated with the string key.

decodeDoubleArray

  public abstract double[] decodeDoubleArray(String key) throws CodingException
Decodes the double array associated with the string key.

decodeString

  public abstract String decodeString(String key) throws CodingException
Decodes the string value associated with the string key.

decodeStringArray

  public abstract String[] decodeStringArray(String key) throws CodingException
Decodes the string array associated with the string key.

decodeObject

  public abstract Object decodeObject(String key) throws CodingException
Decodes a reference to another Codable object.

decodeObjectArray

  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.

replaceObject

  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