org.jpos.iso
Class IF_TCHAR

java.lang.Object
  extended by org.jpos.iso.ISOFieldPackager
      extended by org.jpos.iso.IF_TBASE
          extended by org.jpos.iso.IF_TCHAR

public class IF_TCHAR
extends IF_TBASE

ISOFieldPackager CHARACTERS (ASCII and BINARY) deal fields terminated by special token

Version:
$Id$
Author:
Zhiyu Tang
See Also:
ISOComponent

Field Summary
 
Fields inherited from class org.jpos.iso.ISOFieldPackager
pad
 
Constructor Summary
IF_TCHAR()
           
IF_TCHAR(int len, String description)
           
IF_TCHAR(int len, String description, String token)
           
 
Method Summary
 int getMaxPackedLength()
           
 byte[] pack(ISOComponent c)
           
 int unpack(ISOComponent c, byte[] b, int offset)
           
 
Methods inherited from class org.jpos.iso.IF_TBASE
getToken, setToken
 
Methods inherited from class org.jpos.iso.ISOFieldPackager
createComponent, getDescription, getLength, pack, readBytes, setDescription, setLength, setPad, unpack
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IF_TCHAR

public IF_TCHAR()

IF_TCHAR

public IF_TCHAR(int len,
                String description)
Parameters:
len - - field len
description - symbolic descrption

IF_TCHAR

public IF_TCHAR(int len,
                String description,
                String token)
Parameters:
len - - field len
description - symbolic descrption
token - token descrption
Method Detail

pack

public byte[] pack(ISOComponent c)
            throws ISOException
Specified by:
pack in class ISOFieldPackager
Parameters:
c - - a component
Returns:
packed component
Throws:
ISOException

unpack

public int unpack(ISOComponent c,
                  byte[] b,
                  int offset)
           throws ISOException
Specified by:
unpack in class ISOFieldPackager
Parameters:
c - - the Component to unpack
b - - binary image
offset - - starting offset within the binary image
Returns:
consumed bytes
Throws:
ISOException

getMaxPackedLength

public int getMaxPackedLength()
Specified by:
getMaxPackedLength in class ISOFieldPackager


Copyright © 1998-2012 jPOS.org. All Rights Reserved.