Cramfull Compiled Resources v2.00

be.arci.pub
Class CharEncoder

java.lang.Object
  |
  +--be.arci.cramfull.Encoder
        |
        +--be.arci.pub.CharEncoder

public class CharEncoder
extends Encoder

Example Encoder implementation, that encodes each byte as it's char value.

Encodes a resource by writing each byte as a char.

If you encode resorces using this class, you have to include the CharDecoder class in the distribution of your software.

We supply this class as a free service to all users of the Cramfull Compiled Resources library. You are allowed to modify this source code, provided you move the class out of the be.arci package hierarchy.

Since:
05/nov/2000
See Also:

CharDecoder
,
Encoder

Constructor Summary
CharEncoder()
           
 
Method Summary
 void 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.
 java.lang.String getDecoderClassName()
          The Decoder associated with this Encoder is be.arci.pub.CharDecoder
 
Methods inherited from class be.arci.cramfull.Encoder
write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CharEncoder

public CharEncoder()
Method Detail

encode

public void encode(java.io.DataInput di,
                   int iResourceLength)
            throws java.io.IOException
Description copied from class: Encoder
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.

Overrides:
encode in class Encoder
Tags copied from class: Encoder
Parameters:
di - a DataInput opened on the resource to encode.
iResourceLength - the number of bytes in the di that must be read and encoded.
See Also:
Decoder,
write(char c)

getDecoderClassName

public java.lang.String getDecoderClassName()
The Decoder associated with this Encoder is be.arci.pub.CharDecoder
Overrides:
getDecoderClassName in class Encoder
Returns:
"be.arci.pub.CharDecoder"
See Also:

CharDecoder

Cramfull Compiled Resources v2.00