Gnostice PDFOne
Pro. Ed. v5.0.0


com.gnostice.pdfone.encodings
Class PdfEncodings

java.lang.Object
  extended bycom.gnostice.pdfone.encodings.PdfEncodings

public class PdfEncodings
extends Object

This class defines constants for specifying a character encoding that is different from the font's built-in encoding.


Field Summary
static int CP1252
          Windows Code Page 1252 encoding.
static int LATIN_1
          Western European Latin encoding.
static int UTF_16BE
          16-bit Unicode Tranformation Format (Big Endian byte order)
static int WINANSI
          Windows Ansi encoding.
 
Constructor Summary
PdfEncodings()
           
 
Method Summary
static byte[] getBytes(String s, int encoding)
          Returns a byte array representing a specified string in a specified encoding.
static char[] getChars(byte[] bytes, int encoding)
          Returns a character array representing a specified byte array in a specified encoding.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WINANSI

public static final int WINANSI
Windows Ansi encoding. Same as CP1252 and LATIN_1.

See Also:
Constant Field Values

CP1252

public static final int CP1252
Windows Code Page 1252 encoding. Same as WINANSI and LATIN_1.

See Also:
Constant Field Values

LATIN_1

public static final int LATIN_1
Western European Latin encoding. Same as CP1252 and WINANSI.

See Also:
Constant Field Values

UTF_16BE

public static final int UTF_16BE
16-bit Unicode Tranformation Format (Big Endian byte order)

See Also:
Constant Field Values
Constructor Detail

PdfEncodings

public PdfEncodings()
Method Detail

getBytes

public static byte[] getBytes(String s,
                              int encoding)
Returns a byte array representing a specified string in a specified encoding.

Parameters:
s - string that needs to represented
encoding - encodign in which the string is to be represented
Returns:
byte array containing the specified string in the specified encoding
See Also:
getChars(byte[], int)

getChars

public static char[] getChars(byte[] bytes,
                              int encoding)
Returns a character array representing a specified byte array in a specified encoding.

Parameters:
bytes - byte array that needs to be represented
encoding - encoding with which the byte array needs to be represented
Returns:
character array representing the specified byte array in tje specified encoding
See Also:
getBytes(String, int)

Gnostice PDFOne
Pro. Ed. v5.0.0

To contact our support team, send an e-mail to support@gnostice.com.
 
© 2010 Gnostice Information Technologies Private Limited. All rights reserved.
www.gnostice.com