DynamicPDF by ceTe Software

com.cete.dynamicpdf.text
Class SingleByteEncoder

java.lang.Object
  extended by com.cete.dynamicpdf.text.Encoder
      extended by com.cete.dynamicpdf.text.SingleByteEncoder

public abstract class SingleByteEncoder
extends Encoder

Base class from which single byte encoders are derived.

Licensing:
This class is a DynamicPDF Generator Community Edition feature.

View Example


Method Summary
 char decode(int character)
          Decodes a single character.
 byte encode(char character)
          Encodes a single character.
 byte[] encode(FontSubsetter subsetter, char[] text, int start, int length, boolean rightToLeft)
          Encodes the specified text.
 boolean getIsBuiltInEncoding()
          Gets a value specifying if the encoding is built-in to PDF.
 
Methods inherited from class com.cete.dynamicpdf.text.Encoder
drawEncoding, getBaltic, getCentralEurope, getLatin1, getLatin2, getLatin9, getSpaceIs0x20, getTurkish, getUnicode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

encode

public byte encode(char character)
Encodes a single character.

Parameters:
character - Character to encode.
Returns:
byte The encoded character.

decode

public char decode(int character)
Decodes a single character.

Parameters:
character - the byte character to decode.
Returns:
char the decoded character.

encode

public byte[] encode(FontSubsetter subsetter,
                     char[] text,
                     int start,
                     int length,
                     boolean rightToLeft)
Encodes the specified text.

Specified by:
encode in class Encoder
Parameters:
subsetter - FontSubsetter to use while encoding the text.
text - char[] array to use for the encoding.
start - int start index in the text array
length - int length of text to encode.
rightToLeft - boolean specifies if the text should be encoded right to left.
Returns:
byte[] The encoded text as a byte array.
See Also:
FontSubsetter

getIsBuiltInEncoding

public boolean getIsBuiltInEncoding()
Gets a value specifying if the encoding is built-in to PDF.

Returns:
boolean value specifying if the encoding is built-in to PDF.

DynamicPDF by ceTe Software

API Reference for DynamicPDF v10.04 for Java generated on September 25, 2019
© Copyright 2019, ceTe Software