jPOS 1.6.1 API Documentation

org.jpos.iso
Class ISOFieldPackager

java.lang.Object
  extended by org.jpos.iso.ISOFieldPackager
Direct Known Subclasses:
IF_ECHAR, IF_NOP, IF_TBASE, IF_UNUSED, IFA_LLABINARY, IFA_LLBNUM, IFA_LLLABINARY, IFB_AMOUNT, IFB_LLHFBINARY, IFEB_LLLNUM, IFEB_LLNUM, IFEP_LLCHAR, IFIPM_LLLCHAR, IFMC_LLCHAR, ISOAmountFieldPackager, ISOBinaryFieldPackager, ISOBitMapPackager, ISOFilledStringFieldPackager, ISOMsgFieldPackager, ISOStringFieldPackager

public abstract class ISOFieldPackager
extends java.lang.Object

base class for the various IF*.java Field Packagers Implements "FlyWeight" pattern

Version:
$Id: ISOFieldPackager.java 2594 2008-01-22 16:41:31Z apr $
Author:
apr@cs.com.uy
See Also:
IFA_AMOUNT, IFA_BINARY, IFA_BITMAP, IFA_FLLCHAR, IFA_FLLNUM, IFA_LLCHAR, IFA_LLLBINARY, IFA_LLLCHAR, IFA_LLLNUM, IFA_LLNUM, IFA_NUMERIC, IFB_AMOUNT, IFB_BINARY, IFB_BITMAP, IFB_LLBINARY, IFB_LLCHAR, IFB_LLHBINARY, IFB_LLHCHAR, IFB_LLHECHAR, IFB_LLHNUM, IFB_LLLBINARY, IFB_LLLCHAR, IFB_LLLNUM, IFB_LLNUM, IFB_NUMERIC, IF_CHAR, IF_ECHAR

Constructor Summary
ISOFieldPackager()
          Default Constructor
ISOFieldPackager(int len, java.lang.String description)
           
 
Method Summary
 ISOComponent createComponent(int fieldNumber)
           
 java.lang.String getDescription()
           
 int getLength()
           
abstract  int getMaxPackedLength()
           
abstract  byte[] pack(ISOComponent c)
           
 void pack(ISOComponent c, java.io.ObjectOutput out)
           
 void setDescription(java.lang.String description)
           
 void setLength(int len)
           
 void setPad(boolean pad)
           
abstract  int unpack(ISOComponent c, byte[] b, int offset)
           
 void unpack(ISOComponent c, java.io.InputStream in)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ISOFieldPackager

public ISOFieldPackager()
Default Constructor


ISOFieldPackager

public ISOFieldPackager(int len,
                        java.lang.String description)
Parameters:
len - - field Len
description - - details
Method Detail

getDescription

public java.lang.String getDescription()

setDescription

public void setDescription(java.lang.String description)

getLength

public int getLength()

setLength

public void setLength(int len)

setPad

public void setPad(boolean pad)

getMaxPackedLength

public abstract int getMaxPackedLength()

createComponent

public ISOComponent createComponent(int fieldNumber)

pack

public abstract byte[] pack(ISOComponent c)
                     throws ISOException
Parameters:
c - - a component
Returns:
packed component
Throws:
ISOException

unpack

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

unpack

public void unpack(ISOComponent c,
                   java.io.InputStream in)
            throws java.io.IOException,
                   ISOException
Parameters:
c - - the Component to unpack
in - - input stream
Throws:
ISOException
java.io.IOException

pack

public void pack(ISOComponent c,
                 java.io.ObjectOutput out)
          throws java.io.IOException,
                 ISOException
Parameters:
c - - the Component to unpack
out - - output stream
Throws:
ISOException
java.io.IOException

jPOS.org