Open SiteSearch 4.1.1
Final

ORG.oclc.fmts
Class Latin1Conv

java.lang.Object
  |
  +--ORG.oclc.fmts.Latin1Conv

public class Latin1Conv
extends Object

The Latin1Conv class maintains tables used for mapping ASCII, EBCDIC, and Latin1 charactersets.

The following tables mappings are present:
OCLC-EBCDIC to OCLC-ASCII
OCLC-ASCII to OCLC-EBCDIC
OCLC-EBCDIC to ASCII/Latin1
OCLC-ASCII to ASCII/Latin1
Latin1 to ASCII
Latin1 to EBCDIC

After converting from OCLC-ASCII and OCLC-EBCDIC to ASCII/Latin1, the method doHtmlDiacritics in ORG.oclc.fmts.Diacritics should be used to convert the mapped ASCII diacritics to their real Latin1 value. The ASCII diacritics are initially mapped to unused characters and are then translated to their correct Latin1 representation in the doHtmlDiacritics method.

See Also:
Diacritic, FormatBerUtil

Constructor Summary
Latin1Conv()
          Constructs a Latin1Conv object.
 
Method Summary
static void asciiToEbcdic(byte[] ascii, byte[] ebcdic, int count)
          Converts an array of ASCII characters into an array of EBCDIC characters.
static void asciiToLatin1(byte[] ascii, byte[] latin1, int count)
          Converts an array of ASCII characters into an array of ASCII/Latin1 characters.
static void ebcdicToAscii(byte[] ebcdic, byte[] ascii, int count)
          Converts an array of EBCDIC characters into an array of ASCII characters.
static void ebcdicToLatin1(byte[] ebcdic, byte[] latin1, int count)
          Converts an array of EBCDIC characters into an array of ASCII/Latin1 characters.
static void fromLatin1(char set, byte[] latin1, byte[] target, int count)
          Converts an array of ASCII/Latin1 characters into an array of ASCII or EBCDIC characters.
static void toASCII(byte[] latin1, byte[] ascii, int count)
          Converts an array of Latin1 characters into an array of ASCII characters.
static void toEBCDIC(byte[] latin1, byte[] ebcdic, int count)
          Converts an array of Latin1 characters into an array of EBCDIC characters.
static void toLatin1(char set, byte[] original, byte[] latin1, int count)
          Converts an array of EBCDIC or ASCII characters into an array of ASCII/Latin1 characters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Latin1Conv

public Latin1Conv()
Constructs a Latin1Conv object.
Method Detail

ebcdicToAscii

public static final void ebcdicToAscii(byte[] ebcdic,
                                       byte[] ascii,
                                       int count)
Converts an array of EBCDIC characters into an array of ASCII characters.
Parameters:
ebcdic - the EBCDIC array of characters.
ascii - the ASCII array of characters.
count - the number of characters in the array to convert.

asciiToEbcdic

public static final void asciiToEbcdic(byte[] ascii,
                                       byte[] ebcdic,
                                       int count)
Converts an array of ASCII characters into an array of EBCDIC characters.
Parameters:
ascii - the ASCII array of characters.
ebcdic - the EBCDIC array of characters.
count - the number of characters in the array to convert.

ebcdicToLatin1

public static final void ebcdicToLatin1(byte[] ebcdic,
                                        byte[] latin1,
                                        int count)
Converts an array of EBCDIC characters into an array of ASCII/Latin1 characters.
Parameters:
ebcdic - the EBCDIC array of characters.
latin1 - the ASCII/Latin1 array of characters.
count - the number of characters in the array to convert.

asciiToLatin1

public static final void asciiToLatin1(byte[] ascii,
                                       byte[] latin1,
                                       int count)
Converts an array of ASCII characters into an array of ASCII/Latin1 characters.

Currently this method remaps the characters back to themself. It should be used to implement character mappings that differ from the current ASCII characterset provided.

Parameters:
ascii - the ASCII array of characters.
latin1 - the ASCII/Latin1 array of characters.
count - the number of characters in the array to convert.

toLatin1

public static final void toLatin1(char set,
                                  byte[] original,
                                  byte[] latin1,
                                  int count)
Converts an array of EBCDIC or ASCII characters into an array of ASCII/Latin1 characters.
Parameters:
set - the characterset type either ASCII or EBCDIC.
original - the array of characters.
latin1 - the ASCII/Latin1 array of characters.
count - the number of characters in the array to convert.

toEBCDIC

public static final void toEBCDIC(byte[] latin1,
                                  byte[] ebcdic,
                                  int count)
Converts an array of Latin1 characters into an array of EBCDIC characters.
Parameters:
latin1 - the ASCII/Latin1 array of characters.
ebcdic - the EBCDIC array of characters.
count - the number of characters in the array to convert.

toASCII

public static final void toASCII(byte[] latin1,
                                 byte[] ascii,
                                 int count)
Converts an array of Latin1 characters into an array of ASCII characters.
Parameters:
latin1 - the ASCII/Latin1 array of characters.
ascii - the ASCII array of characters.
count - the number of characters in the array to convert.

fromLatin1

public static final void fromLatin1(char set,
                                    byte[] latin1,
                                    byte[] target,
                                    int count)
Converts an array of ASCII/Latin1 characters into an array of ASCII or EBCDIC characters.
Parameters:
set - the characterset type either ASCII or EBCDIC.
latin1 - the ASCII/Latin1 array of characters.
target - the new array of characters.
count - the number of characters in the array to convert.

Open SiteSearch 4.1.1
Final