Encodes resources into an internal form that can be handled by the
ClassCompiler. First the method
String getDecoderClassName() is invoked on the implementing
subclass, then the method void encode(DataInput di, int iResourceLength).
IMPORTANT: Subclasses should be public and either have no
constructor declaration or have a public constructor that takes no arguments.
Example implementations are given in the package be.arci.pub.
encode(java.io.DataInput di,
int iResourceLength)
Encodes the resource file into a sequence of char-s; implementations must invoke
write(char c) for each encoded char.
abstract java.lang.String
getDecoderClassName()
Returns the qualified java class name (no .class suffix), which is
associated with the resource's internal form.
protected void
write(char c)
Appends an encoded char to the resource's internal form.
Appends an encoded char to the resource's internal form.
Parameters:
c - the encoded char to write to the resource's internal form.
getDecoderClassName
public abstract java.lang.String getDecoderClassName()
Returns the qualified java class name (no .class suffix), which is
associated with the resource's internal form.
Returns:
the qualified java class name (no .class suffix), which is
associated with the resource's internal form.
encode
public abstract void encode(java.io.DataInput di,
int iResourceLength)
throws java.io.IOException
Encodes the resource file into a sequence of char-s; implementations must invoke
write(char c) for each encoded char. The Decoder
will read this char sequence in the same order.
Parameters:
di - a DataInput opened on the resource to encode.
iResourceLength - the number of bytes in the di that must be read and
encoded.