| Modifier and Type | Field and Description |
|---|---|
protected static String |
INVALID_FIELD_NUMBER |
| Constructor and Description |
|---|
RecordImpl() |
RecordImpl(ByteArray record) |
RecordImpl(int recordLength,
String encoding) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
allocateNewRecord(int currentLength,
int newLength,
int replaceLengthField,
int replacedField)
This is a routine that is used to allocate a new record for a field that
has changed length.
|
Object |
clone()
clone this record, including the underlying ByteArray and it's wrapped bytes.
|
Object |
duplicate()
Create a copy of this record, including the underlying ByteArray, but keeping the
same underlying bytes.
|
protected abstract Field |
field(int fieldNumber)
Get the field definition for a specified field based on the field number.
|
String |
fieldName(int fieldNumber)
The name of the field.
|
protected Object |
getField(Field field) |
Object |
getField(int fieldNumber)
The field value.
|
protected ByteArray |
getFieldAsByteArray(Field field) |
protected Date |
getFieldAsDate(Field field) |
protected Date |
getFieldAsDate(Field field,
TimeZone zone) |
protected int |
getFieldAsInt(Field field) |
protected long |
getFieldAsLong(Field field) |
protected OnUsField |
getFieldAsOnUsField(Field field) |
protected RoutingNumber |
getFieldAsRoutingNumber(Field field) |
protected String |
getFieldAsString(Field field) |
protected Date |
getFieldAsTime(Field field) |
protected Date |
getFieldAsTime(Field field,
TimeZone zone) |
int |
length()
This is the length of the current record.
|
abstract int |
numberOfFields()
The number of fields defined for this record.
|
long |
offsetPosition()
The offset of this record in an input stream.
|
Record |
offsetPosition(long offset)
This is used to set the current record offset of this record in the input
stream.
|
ByteArray |
record() |
protected void |
record(ByteArray record)
Certain records are variable in size and can change size based on the
values placed in the fields.
|
int |
recordPosition()
The position of this record in an input stream.
|
Record |
recordPosition(int position)
This is used to set the current record position of this record in the
input stream.
|
protected abstract void |
resetDynamicFields()
This method is intended to allow the reset of dynamic fields back to
their initial state.
|
protected void |
setField(ByteArray value,
Field field) |
protected void |
setField(int value,
Field field) |
Record |
setField(int value,
int fieldNumber)
Set the contents of the field to the specified int value.
|
protected void |
setField(long value,
Field field) |
Record |
setField(long value,
int fieldNumber)
Set the contents of the field to the specified long value.
|
protected void |
setField(OnUsField value,
Field field) |
protected void |
setField(RoutingNumber value,
Field field) |
protected void |
setField(String value,
Field field) |
Record |
setField(String value,
int fieldNumber)
Set the contents of the field to the specified string value.
|
protected void |
setFieldDate(Date value,
Field field) |
protected void |
setFieldDate(Date value,
Field field,
TimeZone zone) |
protected void |
setFieldRight(String value,
Field field) |
protected void |
setFieldTime(Date value,
Field field) |
protected void |
setFieldTime(Date value,
Field field,
TimeZone zone) |
String |
toString() |
String |
toXml()
Creates an XML representation of the record based on it's fields.
|
String |
toXml(boolean useAttributes)
Creates an XML representation of the record based on it's fields.
|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitclearRecordprotected static final String INVALID_FIELD_NUMBER
public RecordImpl()
public RecordImpl(int recordLength,
String encoding)
public RecordImpl(ByteArray record)
public Object clone()
Recordpublic Object duplicate()
Recordpublic Object getField(int fieldNumber) throws InvalidDataException
RecordgetField in interface RecordInvalidDataExceptionpublic Record setField(String value, int fieldNumber)
Recordpublic Record setField(long value, int fieldNumber)
Recordpublic Record setField(int value, int fieldNumber)
Recordpublic String fieldName(int fieldNumber)
Recordprotected Object getField(Field field) throws InvalidDataException
field - The field to be obtained.InvalidDataExceptionprotected RoutingNumber getFieldAsRoutingNumber(Field field)
protected Date getFieldAsDate(Field field) throws InvalidDataException
InvalidDataExceptionprotected Date getFieldAsDate(Field field, TimeZone zone) throws InvalidDataException
InvalidDataExceptionprotected Date getFieldAsTime(Field field) throws InvalidDataException
InvalidDataExceptionprotected Date getFieldAsTime(Field field, TimeZone zone) throws InvalidDataException
InvalidDataExceptionprotected long getFieldAsLong(Field field) throws InvalidDataException
InvalidDataExceptionprotected int getFieldAsInt(Field field) throws InvalidDataException
InvalidDataExceptionprotected void setField(String value, Field field)
value - The new value to be stored in the buffer.field - The field to be updated.protected void setField(RoutingNumber value, Field field)
protected void setField(long value,
Field field)
protected void setField(int value,
Field field)
protected void allocateNewRecord(int currentLength,
int newLength,
int replaceLengthField,
int replacedField)
currentLength - the current length of the fieldnewLength - the new length of the fieldreplaceLengthField - the field number of the length field associated with the fieldreplacedField - the field number of field being replacedpublic int length()
Recordprotected void record(ByteArray record)
record - the record to setpublic int recordPosition()
RecordrecordPosition in interface Recordpublic Record recordPosition(int position)
RecordrecordPosition in interface Recordpublic long offsetPosition()
RecordoffsetPosition in interface Recordpublic Record offsetPosition(long offset)
RecordoffsetPosition in interface Recordpublic abstract int numberOfFields()
RecordnumberOfFields in interface Recordprotected abstract Field field(int fieldNumber)
fieldNumber - protected abstract void resetDynamicFields()
public String toXml()
RecordCopyright © 2009–2016 The Last Check, LLC. All rights reserved.