Interface Encoder
All Packages Class Hierarchy This Package Previous Next Index
Interface Encoder
public interface netscape.util.Encoder
{
/* Methods
*/
public abstract void encodeBoolean(String, boolean);
public abstract void encodeBooleanArray(String, boolean[], int, int);
public abstract void encodeByte(String, byte);
public abstract void encodeByteArray(String, byte[], int, int);
public abstract void encodeChar(String, char);
public abstract void encodeCharArray(String, char[], int, int);
public abstract void encodeDouble(String, double);
public abstract void encodeDoubleArray(String, double[], int, int);
public abstract void encodeFloat(String, float);
public abstract void encodeFloatArray(String, float[], int, int);
public abstract void encodeInt(String, int);
public abstract void encodeIntArray(String, int[], int, int);
public abstract void encodeLong(String, long);
public abstract void encodeLongArray(String, long[], int, int);
public abstract void encodeObject(String, Object);
public abstract void encodeObjectArray(String, Object[], int, int);
public abstract void encodeShort(String, short);
public abstract void encodeShortArray(String, short[], int, int);
public abstract void encodeString(String, String);
public abstract void encodeStringArray(String, String[], int, int);
}
The Encoder interface describes the API through which objects encode
their essential state as a set of key-value pairs. Archiver implements
this API to encode the state of a graph of objects into an Archive.
- See Also:
- Codable, Archiver, Archive
Methods
encodeBoolean
public abstract void encodeBoolean(String key,
boolean value) throws CodingException
- Encodes the boolean value, associating it with the string
key.
encodeBooleanArray
public abstract void encodeBooleanArray(String key,
boolean value[],
int offset,
int length) throws CodingException
- Encodes the boolean array value, associating it with the string
key.
encodeChar
public abstract void encodeChar(String key,
char value) throws CodingException
- Encodes the character value, associating it with the string
key.
encodeCharArray
public abstract void encodeCharArray(String key,
char value[],
int offset,
int length) throws CodingException
- Encodes the character array value, associating it with the
string key.
encodeByte
public abstract void encodeByte(String key,
byte value) throws CodingException
- Encodes the byte value, associating it with the string
key.
encodeByteArray
public abstract void encodeByteArray(String key,
byte value[],
int offset,
int length) throws CodingException
- Encodes the byte array value, associating it with the string
key.
encodeShort
public abstract void encodeShort(String key,
short value) throws CodingException
- Encodes the short value, associating it with the string
key.
encodeShortArray
public abstract void encodeShortArray(String key,
short value[],
int offset,
int length) throws CodingException
- Encodes the short array value, associating it with the string
key.
encodeInt
public abstract void encodeInt(String key,
int value) throws CodingException
- Encodes the integer value, associating it with the string
key.
encodeIntArray
public abstract void encodeIntArray(String key,
int value[],
int offset,
int length) throws CodingException
- Encodes the integer array value, associating it with the string
key.
encodeLong
public abstract void encodeLong(String key,
long value) throws CodingException
- Encodes the long value, associating it with the string
key.
encodeLongArray
public abstract void encodeLongArray(String key,
long value[],
int offset,
int length) throws CodingException
- Encodes the long array value, associating it with the string
key.
encodeFloat
public abstract void encodeFloat(String key,
float value) throws CodingException
- Encodes the float value, associating it with the string
key.
encodeFloatArray
public abstract void encodeFloatArray(String key,
float value[],
int offset,
int length) throws CodingException
- Encodes the float array value, associating it with the string
key.
encodeDouble
public abstract void encodeDouble(String key,
double value) throws CodingException
- Encodes the double value, associating it with the string
key.
encodeDoubleArray
public abstract void encodeDoubleArray(String key,
double value[],
int offset,
int length) throws CodingException
- Encodes the double array value, associating it with the string
key.
encodeString
public abstract void encodeString(String key,
String value) throws CodingException
- Encodes the string value, associating it with the string
key.
encodeStringArray
public abstract void encodeStringArray(String key,
String value[],
int offset,
int length) throws CodingException
- Encodes the string array value, associating it with the string
key.
encodeObject
public abstract void encodeObject(String key,
Object value) throws CodingException
- Encodes a reference to another Codable object. If multiple objects
reference the same object and each passes it to encodeObject(),
only one copy of that object is actually encoded.
encodeObjectArray
public abstract void encodeObjectArray(String key,
Object value[],
int offset,
int length) throws CodingException
- Encodes an array of Codable objects. The reference to the array is
not shared, but references to the objects in the array are.
All Packages Class Hierarchy This Package Previous Next Index