public class ISOMsgRef.Ref extends ISOMsg implements OffsetIndexedComposite
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone() |
java.lang.Object |
clone(int[] fields)
Partially clone an ISOMsg
|
void |
dump(java.io.PrintStream p,
java.lang.String indent)
dump the message to a PrintStream.
|
byte[] |
getBytes()
get Value as bytes (when possible)
|
byte[] |
getBytes(int fldno)
Return the byte[] value associated with the given ISOField number
|
byte[] |
getBytes(java.lang.String fpath)
Return the String value associated with the given field path
|
java.util.Map |
getChildren()
clone fields
|
ISOComponent |
getComponent(int fldno)
get the component associated with the given field number
|
ISOComponent |
getComponent(java.lang.String fpath)
get the component associated with the given field number
|
ISOComponent |
getComposite()
In order to interchange Composites and Leafs we use
getComposite().
|
int |
getDirection() |
byte[] |
getHeader()
get optional message header image
|
ISOHeader |
getISOHeader()
Return this messages ISOHeader
|
java.lang.Object |
getKey()
valid on Leafs only.
|
int |
getMaxField()
a Composite must override this function
|
java.lang.String |
getMTI() |
int |
getOffset() |
ISOPackager |
getPackager() |
java.lang.String |
getString(int fldno)
Return the String value associated with the given ISOField number
|
java.lang.String |
getString(java.lang.String fpath)
Return the String value associated with the given field path
|
java.lang.Object |
getValue()
valid on Leafs only.
|
java.lang.Object |
getValue(int fldno)
Return the object value associated with the given field number
|
java.lang.Object |
getValue(java.lang.String fpath)
Return the object value associated with the given field path
|
boolean |
hasField(int fldno)
Check if a given field is present
|
boolean |
hasField(java.lang.String fpath)
Check if a field indicated by a fpath is present
|
boolean |
hasFields() |
boolean |
hasFields(int[] fields)
Check if all fields are present
|
void |
incOffset() |
boolean |
isIncoming() |
boolean |
isInner() |
boolean |
isOutgoing() |
boolean |
isRequest() |
void |
merge(ISOMsg m) |
void |
move(int oldFieldNumber,
int newFieldNumber)
moves a field (renumber)
|
byte[] |
pack()
pack the message with the current packager
|
void |
pack(java.io.OutputStream out) |
void |
recalcBitMap()
setup BitMap
|
void |
resetOffset() |
void |
set(int fldno,
byte[] value)
Creates an ISOBinaryField associated with fldno within this ISOMsg.
|
void |
set(int fldno,
java.lang.String value)
Creates an ISOField associated with fldno within this ISOMsg.
|
void |
set(ISOComponent c)
Set a field within this message
|
void |
set(java.lang.String fpath,
byte[] value)
Creates an ISOField associated with fldno within this ISOMsg.
|
void |
set(java.lang.String fpath,
ISOComponent c)
Creates an ISOField associated with fldno within this ISOMsg
|
void |
set(java.lang.String fpath,
java.lang.String value)
Creates an ISOField associated with fldno within this ISOMsg.
|
void |
setDirection(int direction)
Sets the direction information related to this message
|
void |
setFieldNumber(int fieldNumber)
changes this Component field number
Use with care, this method does not change any reference held by a Composite. |
void |
setHeader(byte[] b)
Sets an optional message header image
|
void |
setHeader(ISOHeader header) |
void |
setMTI(java.lang.String mti) |
void |
setOffset(int offset) |
void |
setPackager(ISOPackager p) |
void |
setValue(java.lang.Object obj)
Don't call setValue on an ISOMsg.
|
java.lang.String |
toString() |
int |
unpack(byte[] b)
unpack a message
|
void |
unpack(java.io.InputStream in) |
void |
unset(int fldno)
Unset a field if it exists, otherwise ignore.
|
void |
unset(int[] flds)
Unsets several fields at once
|
void |
unset(java.lang.String fpath)
Unset a field referenced by a fpath if it exists, otherwise ignore.
|
clone, getFieldNumber, getSource, getTrailer, hasAny, hasAny, hasMTI, isAdministrative, isAuthorization, isChargeback, isFeeCollection, isFileAction, isFinancial, isNetworkManagement, isReconciliation, isResponse, isRetransmission, isReversal, merge, readDirection, readExternal, readHeader, readPackager, setResponseMTI, setRetransmissionMTI, setSource, setTrailer, unset, writeDirection, writeExternal, writeHeader, writePackager
public void incOffset()
incOffset
in interface OffsetIndexedComposite
public void setOffset(int offset)
setOffset
in interface OffsetIndexedComposite
public void resetOffset()
resetOffset
in interface OffsetIndexedComposite
public int getOffset()
getOffset
in interface OffsetIndexedComposite
public java.lang.Object getKey() throws ISOException
ISOComponent
getKey
in class ISOMsg
ISOException
public void setFieldNumber(int fieldNumber)
ISOMsg
setFieldNumber
in class ISOMsg
fieldNumber
- new field numberpublic void setValue(java.lang.Object obj) throws ISOException
ISOMsg
setValue
in class ISOMsg
ISOException
ISOField
,
ISOException
public void set(ISOComponent c) throws ISOException
ISOMsg
set
in class ISOMsg
c
- - a componentISOException
public void unset(int fldno)
ISOMsg
public ISOComponent getComposite()
ISOMsg
getComposite
in class ISOMsg
public java.lang.Object getValue()
ISOComponent
public byte[] getBytes() throws ISOException
ISOComponent
getBytes
in class ISOComponent
ISOException
public int getMaxField()
ISOComponent
getMaxField
in class ISOMsg
public java.util.Map getChildren()
ISOMsg
getChildren
in class ISOMsg
public void pack(java.io.OutputStream out) throws java.io.IOException, ISOException
pack
in class ISOComponent
java.io.IOException
ISOException
public void dump(java.io.PrintStream p, java.lang.String indent)
ISOMsg
public byte[] pack() throws ISOException
ISOMsg
pack
in class ISOMsg
ISOException
public int unpack(byte[] b) throws ISOException
ISOMsg
unpack
in class ISOMsg
b
- - raw messageISOException
public void unpack(java.io.InputStream in) throws java.io.IOException, ISOException
unpack
in class ISOMsg
java.io.IOException
ISOException
public void setDirection(int direction)
ISOMsg
setDirection
in class ISOMsg
direction
- can be either ISOMsg.INCOMING or ISOMsg.OUTGOINGpublic void setHeader(byte[] b)
ISOMsg
public byte[] getHeader()
ISOMsg
public ISOHeader getISOHeader()
ISOMsg
getISOHeader
in class ISOMsg
public int getDirection()
getDirection
in class ISOMsg
ISOChannel
public boolean isIncoming()
isIncoming
in class ISOMsg
ISOChannel
public boolean isOutgoing()
isOutgoing
in class ISOMsg
ISOChannel
public void setPackager(ISOPackager p)
setPackager
in class ISOMsg
p
- - a peer packagerpublic ISOPackager getPackager()
getPackager
in class ISOMsg
public void set(int fldno, java.lang.String value)
ISOMsg
public void set(java.lang.String fpath, java.lang.String value)
ISOMsg
public void set(java.lang.String fpath, ISOComponent c) throws ISOException
ISOMsg
set
in class ISOMsg
fpath
- dot-separated field path (i.e. 63.2)c
- componentISOException
- on errorpublic void set(java.lang.String fpath, byte[] value)
ISOMsg
public void set(int fldno, byte[] value)
ISOMsg
public void unset(int[] flds)
ISOMsg
public void unset(java.lang.String fpath)
ISOMsg
public void recalcBitMap() throws ISOException
ISOMsg
recalcBitMap
in class ISOMsg
ISOException
- on errorpublic ISOComponent getComponent(int fldno)
ISOMsg
getComponent
in class ISOMsg
fldno
- the Field Numberpublic java.lang.Object getValue(int fldno)
ISOMsg
public java.lang.Object getValue(java.lang.String fpath) throws ISOException
ISOMsg
getValue
in class ISOMsg
fpath
- field pathISOException
- on errorpublic ISOComponent getComponent(java.lang.String fpath) throws ISOException
ISOMsg
getComponent
in class ISOMsg
fpath
- field pathISOException
- on errorpublic java.lang.String getString(int fldno)
ISOMsg
public java.lang.String getString(java.lang.String fpath)
ISOMsg
public byte[] getBytes(int fldno)
ISOMsg
public byte[] getBytes(java.lang.String fpath)
ISOMsg
public boolean hasField(int fldno)
ISOMsg
public boolean hasFields(int[] fields)
ISOMsg
public boolean hasField(java.lang.String fpath)
ISOMsg
public boolean hasFields()
public java.lang.Object clone(int[] fields)
ISOMsg
public java.lang.String toString()
public void setMTI(java.lang.String mti) throws ISOException
setMTI
in class ISOMsg
mti
- new MTIISOException
- if message is inner messagepublic void move(int oldFieldNumber, int newFieldNumber) throws ISOException
ISOMsg
move
in class ISOMsg
oldFieldNumber
- old field numbernewFieldNumber
- new field numberISOException
- on errorpublic java.lang.String getMTI() throws ISOException
getMTI
in class ISOMsg
ISOException
- on inner message or MTI not setpublic boolean isRequest() throws ISOException
isRequest
in class ISOMsg
ISOException
- on MTI not set