|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.solab.iso8583.parse.FieldParseInfo
public abstract class FieldParseInfo
This class is used to parse a field from a message buffer. There are concrete subclasses for each IsoType.
| Field Summary | |
|---|---|
protected int |
length
|
protected IsoType |
type
|
| Constructor Summary | |
|---|---|
FieldParseInfo(IsoType t,
int len)
Creates a new instance that parses a value of the specified type, with the specified length. |
|
| Method Summary | ||
|---|---|---|
String |
getCharacterEncoding()
|
|
static FieldParseInfo |
getInstance(IsoType t,
int len,
String encoding)
Returns a new FieldParseInfo instance that can parse the specified type. |
|
int |
getLength()
Returns the specified length for the data to be parsed. |
|
IsoType |
getType()
Returns the data type for the data to be parsed. |
|
abstract
|
parse(byte[] buf,
int pos,
CustomField<T> custom)
Parses the character data from the buffer and returns the IsoValue with the correct data type in it. |
|
abstract
|
parseBinary(byte[] buf,
int pos,
CustomField<T> custom)
Parses binary data from the buffer, creating and returning an IsoValue of the configured type and length. |
|
void |
setCharacterEncoding(String value)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected IsoType type
protected int length
| Constructor Detail |
|---|
public FieldParseInfo(IsoType t,
int len)
t - The ISO type to be parsed.len - The length of the data to be read (useful only for ALPHA and NUMERIC types).| Method Detail |
|---|
public void setCharacterEncoding(String value)
public String getCharacterEncoding()
public int getLength()
public IsoType getType()
public abstract <T> IsoValue<?> parse(byte[] buf,
int pos,
CustomField<T> custom)
throws ParseException,
UnsupportedEncodingException
ParseException
UnsupportedEncodingException
public abstract <T> IsoValue<?> parseBinary(byte[] buf,
int pos,
CustomField<T> custom)
throws ParseException,
UnsupportedEncodingException
ParseException
UnsupportedEncodingException
public static FieldParseInfo getInstance(IsoType t,
int len,
String encoding)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||