|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Interface describing the required functionality of a
class of objects whose instances can be used
to encode and decode data s
using a recursively-enabled data language.String
In short, an class implementing this interface
must be able to encode an array of data Strings
into a single, compound data String
that can later be decoded back to the original array
of data Strings.
Implementation details such as the encoding scheme,
compression ratio, or information loss, are specific
to a class that implements this interface.
A CODEC class may only be used
after an instance of the class has been installed
using the method.
The standard CODECs provided by the JPT,
whose CODEC identifiers are "CPC" and "ESC",
and are defined in classes
CodecUtilities.installCodec(Codec) and
CountPrefixCodec respectively,
are installed by default by the JPT,
and may be used at any time.EscapedCodec
CodecUtilities| Method Summary | |
String[] |
decode(String data)
Decodes the given compound data String
into an array of data Strings
using the encoding scheme for this class. |
String |
encode(String[] data)
Encodes the given array of data Strings
into a single compound data String
using the encoding scheme for this class. |
String |
getPrefix()
Returns the unique three character prefix used to identify the encoding scheme for this class |
| Method Detail |
public String encode(String[] data)
Strings
into a single compound data String
using the encoding scheme for this class.
data - an array of data Strings
Stringdecode(String),
CodecUtilities.encode(String[]),
CodecUtilities.encode(Stringable[])
public String[] decode(String data)
throws ParseException
String
into an array of data Strings
using the encoding scheme for this class.
data - an encoded data String
Strings
ParseException - if the data was not encoded
using this schemeencode(String[]),
CodecUtilities.decode(String)public String getPrefix()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||