BrField Class
This class manages a single data field.
getNameAs
String getNameAsString()
byte[] getNameAsBytes()getNameAs returns the field name in requested form.
setData
void setData(char srcData)
void setData(byte srcData)
void setData(byte[] srcData)
void setData(short srcData)
void setData(int srcData)
void setData(boolean srcData)
void setData(String srcData)
void setData(BrField srcData)void setData(byte[] srcData, int srcOffset, int length)It also sets the field’s data array to byte array passed in. The data array is enlarged if the length of the incoming data is large than the current array.
appendData
void appendData(byte[] srcData, int srcOffset, int length)
appendData appends the byte array in srcData to the data array of the field. If necessary, the data array of the field is enlarged.
insertData
void insertData(byte[] srcData, int srcOffset, int dstOffset, int dstLength)
insertData inserts the data array of the object at dstOffset to the byte array passed in. The data array is enlarged if the length of the incoming data is larger than the current array.
getData
char getDataAsChar()
byte getDataAsByte()
short getDataAsShort()
int getDataAsInt()
byte[] getDataAsBytes()
boolean getDataAsBoolean()
String getDataAsString()
byte getDataByte(int offset)All of the routines return a copy of the field’s data in the form requested.
isNewData
boolean isNewData()isNewData tests to see if the field’s data was updated.
isNewDataAndNotNull
boolean isNewDataAndNotNull()isNewDataAndNotNull tests to see if the field’s
data was updated and has a nonzero length. It is equivalent to brfld.isNewData() &&
(brfld.getDataLength() > 0).
isDataNotNull
boolean isDataNotNull()isDataNotNull tests to see if the field’s data contains a nonzero length.
getDataLength
int getDataLength()getDataLength returns the length of the data.
getName
byte[] getNameAsBytes()
String getNameAsString()getName returns the field name.
getDataType
byte getDataType()getDataType returns the dataType of the field. Refer to Table 4 for more details.
setDataType
void setDataType(byte newDataType)setDataType sets the dataType for the field. Refer to Table 4 for more details.
newDataBuffer
void newDataBuffer(int dataSize)newDataBuffer re-initializes the data buffer for this data field. This operation will destroy the current data buffer.