net.sf.bacchus.charset
Class X_ACH_XP

java.lang.Object
  extended by java.nio.charset.Charset
      extended by net.sf.bacchus.charset.X_US_ASCII_ACH
          extended by net.sf.bacchus.charset.X_ACH_XP
All Implemented Interfaces:
Comparable<Charset>
Direct Known Subclasses:
X_ACH_XL

public class X_ACH_XP
extends X_US_ASCII_ACH

Charset that decodes only the characters that are allowed in an ACH entry and attempts to transpose other characters to 1-byte equivalents when encoding to ACH. The transpositions replace characters found within the Character.UnicodeBlock.LATIN_1_SUPPLEMENT and Character.UnicodeBlock.LATIN_EXTENDED_A ranges with reasonable equivalents within the 7-bit ASCII range that is allowed within an ACH record. In most cases, the replacement is simply the unaccented version of the same character.


Nested Class Summary
protected static class X_ACH_XP.Transposer
          Encoder that attempts to map out-of-range characters to equivalent characters that can be represented using single-byte representations within the characters valid in an ACH record.
 
Nested classes/interfaces inherited from class net.sf.bacchus.charset.X_US_ASCII_ACH
X_US_ASCII_ACH.Decoder, X_US_ASCII_ACH.Encoder
 
Field Summary
static String NAME
          the name of this character set.
 
Fields inherited from class net.sf.bacchus.charset.X_US_ASCII_ACH
REPLACEMENT
 
Constructor Summary
  X_ACH_XP()
          Initializes a new X-ACH-X Charset.
protected X_ACH_XP(String name)
          Initializes a new ACH Charset with the given name and no aliases.
 
Method Summary
 boolean contains(Charset cs)
          This is a very limited Charset that is assumed only to contain itself and those character sets contained by X_US_ASCII_ACH.
 CharsetEncoder newEncoder()
          Delegates to X_US_ASCII_ACH.newEncoder(), which is a temporary implementation.
 
Methods inherited from class net.sf.bacchus.charset.X_US_ASCII_ACH
newDecoder
 
Methods inherited from class java.nio.charset.Charset
aliases, availableCharsets, canEncode, compareTo, decode, defaultCharset, displayName, displayName, encode, encode, equals, forName, hashCode, isRegistered, isSupported, name, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NAME

public static final String NAME
the name of this character set.

See Also:
Constant Field Values
Constructor Detail

X_ACH_XP

public X_ACH_XP()
Initializes a new X-ACH-X Charset.


X_ACH_XP

protected X_ACH_XP(String name)
Initializes a new ACH Charset with the given name and no aliases.

Parameters:
name - the name of the character set.
Method Detail

contains

public boolean contains(Charset cs)
This is a very limited Charset that is assumed only to contain itself and those character sets contained by X_US_ASCII_ACH.

Overrides:
contains in class X_US_ASCII_ACH
Parameters:
cs -
Returns:
See Also:
X_US_ASCII_ACH.contains(Charset)

newEncoder

public CharsetEncoder newEncoder()
Delegates to X_US_ASCII_ACH.newEncoder(), which is a temporary implementation.

Overrides:
newEncoder in class X_US_ASCII_ACH
Returns:
See Also:
X_US_ASCII_ACH.newEncoder()


Copyright © 2008-2009 Bacchus Development Team. All Rights Reserved.