fr.umlv.tatoo.cc.lexer.charset.encoding
Class Encoding

java.lang.Object
  extended by fr.umlv.tatoo.cc.lexer.charset.encoding.Encoding
Direct Known Subclasses:
ASCIIEncoding, ISO8859_1Encoding, UTF16Encoding, UTF8Encoding

public abstract class Encoding
extends Object


Method Summary
abstract  char decode(int c)
          Returns the character corresponding to a specific code.
abstract  int encode(char c)
          Returns the encoding of a single character.
 CharacterSet getAny()
          Returns the charset coresponding to any character.
abstract  int getMaxValue()
          Returns a constant corresponding to the maximum value of the charset.
abstract  int getMinValue()
          Returns a constant corresponding to the minimum value of the charset.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getMinValue

public abstract int getMinValue()
Returns a constant corresponding to the minimum value of the charset. Implementation of this method should not access to fields.

Returns:
the minimum value of the charset

getMaxValue

public abstract int getMaxValue()
Returns a constant corresponding to the maximum value of the charset. Implementation of this method should not access to fields.

Returns:
the maximum value of the charset

encode

public abstract int encode(char c)
Returns the encoding of a single character.

Parameters:
c - the character to encode.
Returns:
the encoding of the character.

decode

public abstract char decode(int c)
Returns the character corresponding to a specific code.

Parameters:
c - the code
Returns:
the character decoded.

getAny

public CharacterSet getAny()
Returns the charset coresponding to any character.

Returns:
the charset for any character.