Java Doc for PdfEncodings.java in  » PDF » pdf-itext » com » lowagie » text » pdf » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » PDF » pdf itext » com.lowagie.text.pdf 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.lowagie.text.pdf.PdfEncodings

PdfEncodings
public class PdfEncodings (Code)
Supports fast encodings for winansi and PDFDocEncoding. Supports conversions from CJK encodings to CID. Supports custom encodings.
author:
   Paulo Soares (psoares@consiste.pt)


Field Summary
final protected static  intCIDCHAR
    
final protected static  intCIDNONE
    
final protected static  intCIDRANGE
    
final public static  byteCRLF_CID_NEWLINE
     Assumes that '\\n' and '\\r\\n' are the newline sequences.
final static  HashMapcmaps
    
static  HashMapextraEncodings
    
final static  IntHashtablepdfEncoding
    
final static  charpdfEncodingByteToChar
    
final static  IntHashtablewinansi
    
final static  charwinansiByteToChar
    


Method Summary
public static  voidaddExtraEncoding(String name, ExtraEncoding enc)
     Adds an extra encoding.
Parameters:
  name - the name of the encoding.
static  voidbreakLong(long n, int size, byte seqs)
    
public static  voidclearCmap(String name)
     Clears the CJK cmaps from the cache.
public static  StringconvertCmap(String name, byte seq)
     Converts a byte array encoded as name to a CID string.
public static  StringconvertCmap(String name, byte seq, int start, int length)
     Converts a byte array encoded as name to a CID string.
final public static  byte[]convertToBytes(String text, String encoding)
     Converts a String to a byte array according to the font's encoding.
final public static  byte[]convertToBytes(char char1, String encoding)
     Converts a String to a byte array according to the font's encoding.
final public static  StringconvertToString(byte bytes, String encoding)
     Converts a byte array to a String according to the some encoding.
static  StringdecodeSequence(byte seq, int start, int length, char planes)
    
static  voidencodeSequence(int size, byte seqs, char cid, ArrayList planes)
    
static  voidencodeStream(InputStream in, ArrayList planes)
    
public static  booleanisPdfDocEncoding(String text)
     Checks is text only has PdfDocEncoding characters.
public static  voidloadCmap(String name, byte newline)
     Loads a CJK cmap to the cache with the option of associating sequences to the newline.
Parameters:
  name - the CJK cmap name
Parameters:
  newline - the sequences to be replaced bi a newline in the resulting CID.
static  char[][]readCmap(String name, byte newline)
    
static  voidreadCmap(String name, ArrayList planes)
    

Field Detail
CIDCHAR
final protected static int CIDCHAR(Code)



CIDNONE
final protected static int CIDNONE(Code)



CIDRANGE
final protected static int CIDRANGE(Code)



CRLF_CID_NEWLINE
final public static byte CRLF_CID_NEWLINE(Code)
Assumes that '\\n' and '\\r\\n' are the newline sequences. It may not work for all CJK encodings. To be used with loadCmap().



cmaps
final static HashMap cmaps(Code)



extraEncodings
static HashMap extraEncodings(Code)



pdfEncoding
final static IntHashtable pdfEncoding(Code)



pdfEncodingByteToChar
final static char pdfEncodingByteToChar(Code)



winansi
final static IntHashtable winansi(Code)



winansiByteToChar
final static char winansiByteToChar(Code)





Method Detail
addExtraEncoding
public static void addExtraEncoding(String name, ExtraEncoding enc)(Code)
Adds an extra encoding.
Parameters:
  name - the name of the encoding. The encoding recognition is case insensitive
Parameters:
  enc - the conversion class



breakLong
static void breakLong(long n, int size, byte seqs)(Code)



clearCmap
public static void clearCmap(String name)(Code)
Clears the CJK cmaps from the cache. If name is the empty string then all the cache is cleared. Calling this method has no consequences other than the need to reload the cmap if needed.
Parameters:
  name - the name of the cmap to clear or all the cmaps if the empty string



convertCmap
public static String convertCmap(String name, byte seq)(Code)
Converts a byte array encoded as name to a CID string. This is needed to reach some CJK characters that don't exist in 16 bit Unicode.

The font to use this result must use the encoding "Identity-H" or "Identity-V".

See ftp://ftp.oreilly.com/pub/examples/nutshell/cjkv/adobe/.
Parameters:
  name - the CJK encoding name
Parameters:
  seq - the byte array to be decoded the CID string



convertCmap
public static String convertCmap(String name, byte seq, int start, int length)(Code)
Converts a byte array encoded as name to a CID string. This is needed to reach some CJK characters that don't exist in 16 bit Unicode.

The font to use this result must use the encoding "Identity-H" or "Identity-V".

See ftp://ftp.oreilly.com/pub/examples/nutshell/cjkv/adobe/.
Parameters:
  name - the CJK encoding name
Parameters:
  start - the start offset in the data
Parameters:
  length - the number of bytes to convert
Parameters:
  seq - the byte array to be decoded the CID string



convertToBytes
final public static byte[] convertToBytes(String text, String encoding)(Code)
Converts a String to a byte array according to the font's encoding. an array of byte representing the conversion according to the font's encoding
Parameters:
  encoding - the encoding
Parameters:
  text - the String to be converted



convertToBytes
final public static byte[] convertToBytes(char char1, String encoding)(Code)
Converts a String to a byte array according to the font's encoding. an array of byte representing the conversion according to the font's encoding
Parameters:
  encoding - the encoding
Parameters:
  char1 - the char to be converted



convertToString
final public static String convertToString(byte bytes, String encoding)(Code)
Converts a byte array to a String according to the some encoding.
Parameters:
  bytes - the bytes to convert
Parameters:
  encoding - the encoding the converted String



decodeSequence
static String decodeSequence(byte seq, int start, int length, char planes)(Code)



encodeSequence
static void encodeSequence(int size, byte seqs, char cid, ArrayList planes)(Code)



encodeStream
static void encodeStream(InputStream in, ArrayList planes) throws IOException(Code)



isPdfDocEncoding
public static boolean isPdfDocEncoding(String text)(Code)
Checks is text only has PdfDocEncoding characters.
Parameters:
  text - the String to test true if only PdfDocEncoding characters are present



loadCmap
public static void loadCmap(String name, byte newline)(Code)
Loads a CJK cmap to the cache with the option of associating sequences to the newline.
Parameters:
  name - the CJK cmap name
Parameters:
  newline - the sequences to be replaced bi a newline in the resulting CID. See CRLF_CID_NEWLINE



readCmap
static char[][] readCmap(String name, byte newline) throws IOException(Code)



readCmap
static void readCmap(String name, ArrayList planes) throws IOException(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.