org.apache.xml.serializer
Class EncodingInfo.EncodingImpl

java.lang.Object
  extended by org.apache.xml.serializer.EncodingInfo.EncodingImpl
All Implemented Interfaces:
EncodingInfo.InEncoding
Enclosing class:
EncodingInfo

private class EncodingInfo.EncodingImpl
extends java.lang.Object
implements EncodingInfo.InEncoding

This class implements the


Field Summary
private  EncodingInfo.InEncoding m_after
          The object, of the same type as this one, that handles unicode values in a range after the range explictly handled by this object, and to which this object may delegate.
private  boolean[] m_alreadyKnown
          A flag to record if we already know the answer for the given unicode value.
private  EncodingInfo.InEncoding m_before
          The object, of the same type as this one, that handles unicode values in a range before the range explictly handled by this object, and to which this object may delegate.
private  java.lang.String m_encoding
          The encoding.
private  int m_explFirst
          m_explFirst through m_explLast is the range of unicode value that this object handles explicitly and does not delegate to a similar object.
private  int m_explLast
           
private  int m_first
          m_first through m_last is the range of unicode values that this object will return an answer on.
private  boolean[] m_isInEncoding
          A table holding the answer on whether the given unicode value is in the encoding.
private  int m_last
           
private static int RANGE
          The number of unicode values explicitly handled by a single EncodingInfo object.
 
Constructor Summary
private EncodingInfo.EncodingImpl()
           
private EncodingInfo.EncodingImpl(java.lang.String encoding, int first, int last, int codePoint)
           
 
Method Summary
 boolean isInEncoding(char ch1)
          Returns true if the char is in the encoding
 boolean isInEncoding(char high, char low)
          Returns true if the high/low surrogate pair forms a character that is in the encoding.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_encoding

private final java.lang.String m_encoding
The encoding.


m_first

private final int m_first
m_first through m_last is the range of unicode values that this object will return an answer on. It may delegate to a similar object with a different range


m_explFirst

private final int m_explFirst
m_explFirst through m_explLast is the range of unicode value that this object handles explicitly and does not delegate to a similar object.


m_explLast

private final int m_explLast

m_last

private final int m_last

m_before

private EncodingInfo.InEncoding m_before
The object, of the same type as this one, that handles unicode values in a range before the range explictly handled by this object, and to which this object may delegate.


m_after

private EncodingInfo.InEncoding m_after
The object, of the same type as this one, that handles unicode values in a range after the range explictly handled by this object, and to which this object may delegate.


RANGE

private static final int RANGE
The number of unicode values explicitly handled by a single EncodingInfo object. This value is tuneable, but is set to 128 because that covers the entire low range of ASCII type chars within a single object.

See Also:
Constant Field Values

m_alreadyKnown

private final boolean[] m_alreadyKnown
A flag to record if we already know the answer for the given unicode value.


m_isInEncoding

private final boolean[] m_isInEncoding
A table holding the answer on whether the given unicode value is in the encoding.

Constructor Detail

EncodingInfo.EncodingImpl

private EncodingInfo.EncodingImpl()

EncodingInfo.EncodingImpl

private EncodingInfo.EncodingImpl(java.lang.String encoding,
                                  int first,
                                  int last,
                                  int codePoint)
Method Detail

isInEncoding

public boolean isInEncoding(char ch1)
Description copied from interface: EncodingInfo.InEncoding
Returns true if the char is in the encoding

Specified by:
isInEncoding in interface EncodingInfo.InEncoding

isInEncoding

public boolean isInEncoding(char high,
                            char low)
Description copied from interface: EncodingInfo.InEncoding
Returns true if the high/low surrogate pair forms a character that is in the encoding.

Specified by:
isInEncoding in interface EncodingInfo.InEncoding