org.jqurantree.arabic.encoding
Class ArabicDecoderBase

java.lang.Object
  extended by org.jqurantree.arabic.encoding.ArabicDecoderBase
All Implemented Interfaces:
ArabicDecoder
Direct Known Subclasses:
BuckwalterDecoder, UnicodeDecoder

public abstract class ArabicDecoderBase
extends java.lang.Object
implements ArabicDecoder

ArabicDecoderBase is an abstract base class providing a common implementation for ArabicText decoders. The class supports the ArabicText.fromEncoding(String, EncodingType) method by implementing table-driven decoding. An EncodingTableBase instance is used to lookup the mapping for each character in the source text.

Author:
Kais Dukes

Constructor Summary
protected ArabicDecoderBase(EncodingTableBase encodingTable)
          Creates a new decoder using the specified encoding table.
 
Method Summary
 byte[] decode(java.lang.String text)
          Decodes a plain text string into the internal ByteFormat according to the encoding scheme.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArabicDecoderBase

protected ArabicDecoderBase(EncodingTableBase encodingTable)
Creates a new decoder using the specified encoding table.

Parameters:
encodingTable - the encoding table to use when performing table-driven decoding.
Method Detail

decode

public byte[] decode(java.lang.String text)
Description copied from interface: ArabicDecoder
Decodes a plain text string into the internal ByteFormat according to the encoding scheme.

Specified by:
decode in interface ArabicDecoder
Parameters:
text - the plain text string to decode
Returns:
a byte[] array in the internal ByteFormat


Copyright© Kais Dukes, 2009. All Rights Reserved.