Class IF_TCHAR
java.lang.Object
org.jpos.iso.ISOFieldPackager
org.jpos.iso.IF_TBASE
org.jpos.iso.IF_TCHAR
- All Implemented Interfaces:
TaggedFieldPackager
-
Field Summary
Fields inherited from class ISOFieldPackager
pad, trim -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the maximum number of bytes this packager can produce.byte[]pack(ISOComponent c) Packs the given component into a byte array.intunpack(ISOComponent c, byte[] b, int offset) Unpacks a field from the binary image into the given component.Methods inherited from class ISOFieldPackager
createComponent, getDescription, getLength, pack, readBytes, setDescription, setLength, setPad, setTrim, unpackModifier and TypeMethodDescriptioncreateComponent(int fieldNumber) Creates anISOComponentinstance appropriate for this packager.Returns the field description.intReturns the maximum field length.voidpack(ISOComponent c, ObjectOutput out) Packs the component to an ObjectOutput stream.protected byte[]readBytes(InputStream in, int l) Reads exactlylbytes from the input stream.voidsetDescription(String description) Sets the field description.voidsetLength(int len) Sets the maximum field length.voidsetPad(boolean pad) Enables or disables padding for this field.voidsetTrim(boolean trim) Enables or disables trimming for this field.voidunpack(ISOComponent c, InputStream in) Unpacks a field from an input stream into the given component.
-
Constructor Details
-
IF_TCHAR
public IF_TCHAR()Default constructor. -
IF_TCHAR
-
IF_TCHAR
-
-
Method Details
-
pack
Description copied from class:ISOFieldPackagerPacks the given component into a byte array.- Specified by:
packin classISOFieldPackager- Parameters:
c- - a component- Returns:
- packed component
- Throws:
ISOException- on ISO processing error
-
unpack
Description copied from class:ISOFieldPackagerUnpacks a field from the binary image into the given component.- Specified by:
unpackin classISOFieldPackager- Parameters:
c- - the Component to unpackb- - binary imageoffset- - starting offset within the binary image- Returns:
- consumed bytes
- Throws:
ISOException- on ISO processing error
-
getMaxPackedLength
Description copied from class:ISOFieldPackagerReturns the maximum number of bytes this packager can produce.- Specified by:
getMaxPackedLengthin classISOFieldPackager- Returns:
- maximum packed length in bytes
-