jPod PDF library

de.intarsys.pdf.font
Class IdentityCMap

java.lang.Object
  extended by de.intarsys.pdf.cos.COSBasedObject
      extended by de.intarsys.pdf.font.CMap
          extended by de.intarsys.pdf.font.IdentityCMap
All Implemented Interfaces:
ICOSObjectListener, de.intarsys.tools.attribute.IAttributeSupport

public class IdentityCMap
extends CMap

The generic 2 byte identity mapping (Identity-H and Identity-V).


Nested Class Summary
 
Nested classes/interfaces inherited from class de.intarsys.pdf.font.CMap
CMap.MetaClass
 
Field Summary
static COSName CN_Identity_H
           
static COSName CN_Identity_V
           
static IdentityCMap SINGLETON
           
 
Fields inherited from class de.intarsys.pdf.font.CMap
META
 
Method Summary
 char[] getChars(int codepoint)
          Get the char[] for the codepoint or null if not available.
 int getDecoded(int value)
          Get the character for the codepoint or -1 if not available.
 int getEncoded(int character)
          Get the codepoint for the the character or -1 if invalid.
 int getNextDecoded(InputStream is)
          Get the next decoded character from the input stream.
 int getNextEncoded(InputStream is)
          The next codepoint from the input stream.
static CMap getSingleton(COSName name)
           
 void putNextDecoded(OutputStream os, int character)
          Put the next character onto the input stream after encoding.
 void putNextEncoded(OutputStream os, int codepoint)
          Put the next codepoint onto the input stream.
 
Methods inherited from class de.intarsys.pdf.font.CMap
toInt, toInt
 
Methods inherited from class de.intarsys.pdf.cos.COSBasedObject
changed, cosGetArray, cosGetDict, cosGetDoc, cosGetField, cosGetObject, cosGetStream, cosHasField, cosRemoveField, cosSetField, getAttribute, getFieldBoolean, getFieldDate, getFieldFixed, getFieldFixedArray, getFieldInt, getFieldMLString, getFieldString, invalidateCaches, removeAttribute, setAttribute, setFieldBoolean, setFieldFixed, setFieldInt, setFieldMLString, setFieldName, setFieldObject, setFieldString, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CN_Identity_H

public static final COSName CN_Identity_H

CN_Identity_V

public static final COSName CN_Identity_V

SINGLETON

public static IdentityCMap SINGLETON
Method Detail

getSingleton

public static CMap getSingleton(COSName name)

getChars

public char[] getChars(int codepoint)
Description copied from class: CMap
Get the char[] for the codepoint or null if not available. This is used in /ToUnicode mappings where a codepoint may map to a string (as for example in ligatures).

Specified by:
getChars in class CMap
Parameters:
codepoint - The codepoint
Returns:
The corresponding char[] for the codepoint.

getDecoded

public int getDecoded(int value)
Description copied from class: CMap
Get the character for the codepoint or -1 if not available.

Specified by:
getDecoded in class CMap
Parameters:
value - The codepoint
Returns:
Get the character for the codepoint or -1 if not available.

getEncoded

public int getEncoded(int character)
Description copied from class: CMap
Get the codepoint for the the character or -1 if invalid.

Specified by:
getEncoded in class CMap
Parameters:
character - The character to look up.
Returns:
Get the codepoint for the the character or -1 if invalid.

getNextDecoded

public int getNextDecoded(InputStream is)
                   throws IOException
Description copied from class: CMap
Get the next decoded character from the input stream. This method reads as much bytes as needed by the encoding and returns the decoded character.

Specified by:
getNextDecoded in class CMap
Parameters:
is - The input stream with encoded data.
Returns:
The next decoded character from the input stream.
Throws:
IOException

getNextEncoded

public int getNextEncoded(InputStream is)
                   throws IOException
Description copied from class: CMap
The next codepoint from the input stream. This method reads as much bytes as needed by the encoding and returns the complete multibyte codepoint.

Specified by:
getNextEncoded in class CMap
Parameters:
is - The input stream with encoded data.
Returns:
The next codepoint from the input stream.
Throws:
IOException

putNextDecoded

public void putNextDecoded(OutputStream os,
                           int character)
                    throws IOException
Description copied from class: CMap
Put the next character onto the input stream after encoding. This method writes as much bytes as needed by the encoding.

Specified by:
putNextDecoded in class CMap
Parameters:
os - The stream to write the bytes.
character - The character to be encoded.
Throws:
IOException

putNextEncoded

public void putNextEncoded(OutputStream os,
                           int codepoint)
                    throws IOException
Description copied from class: CMap
Put the next codepoint onto the input stream. This method writes as much bytes as needed by the encoding.

Specified by:
putNextEncoded in class CMap
Parameters:
os - The stream to write the bytes.
codepoint - The codepoint.
Throws:
IOException

jPod PDF library

Copyright © 2008 intarsys consulting GmbH. All Rights Reserved.