org.jqurantree.arabic.encoding.simple
Class SimpleEncoder

java.lang.Object
  extended by org.jqurantree.arabic.encoding.ArabicEncoderBase
      extended by org.jqurantree.arabic.encoding.simple.SimpleEncoder
All Implemented Interfaces:
ArabicEncoder

public class SimpleEncoder
extends ArabicEncoderBase

Supports encoding ArabicText into simple encoding. This class is used by the ArabicText.toSimpleEncoding() method. Simple encoding is an easy to read encoding scheme that shows the name of each letter within Arabic text, together with the names of any attached diacritics. Each character will be seperated by a | sign (vertical bar), with diacritics within a character seperated by a + (plus) sign.

Author:
Kais Dukes

Field Summary
 
Fields inherited from class org.jqurantree.arabic.encoding.ArabicEncoderBase
text
 
Constructor Summary
SimpleEncoder()
          Creates a new simple encoder.
 
Method Summary
protected  void encodeCharacter(byte[] buffer, int offset)
          Encodes a single ArabicCharacter in the internal ByteFormat.
protected  void writeCharacterSeperator()
          Overriden by derived encoders to write a seperator between each ArabicCharacter.
 
Methods inherited from class org.jqurantree.arabic.encoding.ArabicEncoderBase
encode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleEncoder

public SimpleEncoder()
Creates a new simple encoder.

Method Detail

encodeCharacter

protected void encodeCharacter(byte[] buffer,
                               int offset)
Description copied from class: ArabicEncoderBase
Encodes a single ArabicCharacter in the internal ByteFormat.

Overrides:
encodeCharacter in class ArabicEncoderBase
Parameters:
buffer - the byte[] buffer holding the character
offset - the offset of the character within the buffer

writeCharacterSeperator

protected void writeCharacterSeperator()
Description copied from class: ArabicEncoderBase
Overriden by derived encoders to write a seperator between each ArabicCharacter.

Overrides:
writeCharacterSeperator in class ArabicEncoderBase


Copyright© Kais Dukes, 2009. All Rights Reserved.