jPOS 1.6.1 API Documentation

org.jpos.iso
Class AsciiInterpreter

java.lang.Object
  extended by org.jpos.iso.AsciiInterpreter
All Implemented Interfaces:
Interpreter

public class AsciiInterpreter
extends java.lang.Object
implements Interpreter

Implements ASCII Interpreter. Strings are converted to and from ASCII bytes. This uses the US-ASCII encoding which all JVMs must support.

Version:
$Revision: 2605 $ $Date: 2008-02-12 06:25:27 -0800 (Tue, 12 Feb 2008) $
Author:
joconnor

Field Summary
static AsciiInterpreter INSTANCE
          An instance of this Interpreter.
 
Constructor Summary
AsciiInterpreter()
           
 
Method Summary
 int getPackedLength(int nDataUnits)
          (non-Javadoc)
 void interpret(java.lang.String data, byte[] b, int offset)
          (non-Javadoc)
 java.lang.String uninterpret(byte[] rawData, int offset, int length)
          (non-Javadoc)
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final AsciiInterpreter INSTANCE
An instance of this Interpreter. Only one needed for the whole system

Constructor Detail

AsciiInterpreter

public AsciiInterpreter()
Method Detail

interpret

public void interpret(java.lang.String data,
                      byte[] b,
                      int offset)
(non-Javadoc)

Specified by:
interpret in interface Interpreter
Parameters:
data - The data to be interpreted.
See Also:
org.jpos.iso.Interpreter#interpret(java.lang.String)

uninterpret

public java.lang.String uninterpret(byte[] rawData,
                                    int offset,
                                    int length)
(non-Javadoc)

Specified by:
uninterpret in interface Interpreter
Parameters:
rawData - The interpreted data.
offset - The index in rawData to start interpreting at.
length - The number of data units to interpret.
Returns:
The uninterpreted data.
See Also:
org.jpos.iso.Interpreter#uninterpret(byte[])

getPackedLength

public int getPackedLength(int nDataUnits)
(non-Javadoc)

Specified by:
getPackedLength in interface Interpreter
See Also:
Interpreter.getPackedLength(int)

jPOS.org