org.jpos.iso
Class ISOFieldPackager
java.lang.Object
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, ISOAmountFieldPackager, ISOBinaryFieldPackager, ISOBitMapPackager, ISOFilledStringFieldPackager, ISOMsgFieldPackager, ISOStringFieldPackager, ISOTagStringFieldPackager
public abstract class ISOFieldPackager
- extends Object
base class for the various IF*.java Field Packagers
Implements "FlyWeight" pattern
- Version:
- $Id$
- 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
|
Field Summary |
protected boolean |
pad
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
pad
protected boolean pad
ISOFieldPackager
public ISOFieldPackager()
- Default Constructor
ISOFieldPackager
public ISOFieldPackager(int len,
String description)
- Parameters:
len - - field Lendescription - - details
getDescription
public String getDescription()
setDescription
public void setDescription(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 unpackb - - binary imageoffset - - starting offset within the binary image
- Returns:
- consumed bytes
- Throws:
ISOException
unpack
public void unpack(ISOComponent c,
InputStream in)
throws IOException,
ISOException
- Parameters:
c - - the Component to unpackin - - input stream
- Throws:
ISOException
IOException
pack
public void pack(ISOComponent c,
ObjectOutput out)
throws IOException,
ISOException
- Parameters:
c - - the Component to unpackout - - output stream
- Throws:
ISOException
IOException
readBytes
protected byte[] readBytes(InputStream in,
int l)
throws IOException
- Throws:
IOException
Copyright © 1998-2012 jPOS.org. All Rights Reserved.