|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FieldAdapter
Defines an adapter object for table fields that can
read the field value from a byte array or write the
field value into a byte array. Also has methods for
formatting the value into an output writer for either
delimited or fixed-width output. Methods not appropriate
for the field type will throw UnsupportedOperationException
.
Method Summary | |
---|---|
BigInteger |
getBigInteger(byte[] buf,
int offset,
int length,
int startBit,
int stopBit)
Gets the field value as a Java BigInteger. |
byte |
getByte(byte[] buf,
int offset,
int length,
int startBit,
int stopBit)
Gets the field value as a Java byte. |
double |
getDouble(byte[] buf,
int offset,
int length,
int startBit,
int stopBit)
Gets the field value as a Java double. |
float |
getFloat(byte[] buf,
int offset,
int length,
int startBit,
int stopBit)
Gets the field value as a Java float. |
int |
getInt(byte[] buf,
int offset,
int length,
int startBit,
int stopBit)
Gets the field value as a Java int. |
long |
getLong(byte[] buf,
int offset,
int length,
int startBit,
int stopBit)
Gets the field value as a Java long. |
short |
getShort(byte[] buf,
int offset,
int length,
int startBit,
int stopBit)
Gets the field value as a Java short. |
String |
getString(byte[] buf,
int offset,
int length,
int startBit,
int stopBit)
Gets the field value as a Java string, using the US-ASCII character set to convert from bytes to characters. |
String |
getString(byte[] buf,
int offset,
int length,
int startBit,
int stopBit,
Charset charset)
Gets the field value as a Java string, using a specified character set to convert from bytes to characters. |
void |
setBigInteger(BigInteger value,
int offset,
int length,
ByteBuffer buffer,
boolean isRightJustified)
Sets the field value as a Java BigInteger. |
void |
setByte(byte value,
int offset,
int length,
ByteBuffer buffer,
boolean isRightJustified)
Sets the field value as a Java byte. |
void |
setDouble(double value,
int offset,
int length,
ByteBuffer buffer,
boolean isRightJustified)
Sets the field value as a Java double. |
void |
setFloat(float value,
int offset,
int length,
ByteBuffer buffer,
boolean isRightJustified)
Sets the field value as a Java float. |
void |
setInt(int value,
int offset,
int length,
ByteBuffer buffer,
boolean isRightJustified)
Sets the field value as a Java int. |
void |
setLong(long value,
int offset,
int length,
ByteBuffer buffer,
boolean isRightJustified)
Sets the field value as a Java long. |
void |
setShort(short value,
int offset,
int length,
ByteBuffer buffer,
boolean isRightJustified)
Sets the field value as a Java short. |
void |
setString(String value,
int offset,
int length,
ByteBuffer buffer,
boolean isRightJustified)
Sets the field value as a Java string. |
void |
setString(String value,
int offset,
int length,
ByteBuffer buffer,
boolean isRightJustified,
Charset charset)
Sets the field value as a Java string, using a specified character set to convert from characters to bytes. |
Method Detail |
---|
byte getByte(byte[] buf, int offset, int length, int startBit, int stopBit)
buf
- the byte array containing the fieldoffset
- the field offsetlength
- the length of the field datastartBit
- the start bit, for bit fieldsstopBit
- the stop bit, for bit fields
short getShort(byte[] buf, int offset, int length, int startBit, int stopBit)
buf
- the byte array containing the fieldoffset
- the field offsetlength
- the length of the field datastartBit
- the start bit, for bit fieldsstopBit
- the stop bit, for bit fields
int getInt(byte[] buf, int offset, int length, int startBit, int stopBit)
buf
- the byte array containing the fieldoffset
- the field offsetlength
- the length of the field datastartBit
- the start bit, for bit fieldsstopBit
- the stop bit, for bit fields
long getLong(byte[] buf, int offset, int length, int startBit, int stopBit)
buf
- the byte array containing the fieldoffset
- the field offsetlength
- the length of the field datastartBit
- the start bit, for bit fieldsstopBit
- the stop bit, for bit fields
BigInteger getBigInteger(byte[] buf, int offset, int length, int startBit, int stopBit)
buf
- the byte array containing the fieldoffset
- the field offsetlength
- the length of the field datastartBit
- the start bit, for bit fieldsstopBit
- the stop bit, for bit fields
BigInteger
float getFloat(byte[] buf, int offset, int length, int startBit, int stopBit)
buf
- the byte array containing the fieldoffset
- the field offsetlength
- the length of the field datastartBit
- the start bit, for bit fieldsstopBit
- the stop bit, for bit fields
double getDouble(byte[] buf, int offset, int length, int startBit, int stopBit)
buf
- the byte array containing the fieldoffset
- the field offsetlength
- the length of the field datastartBit
- the start bit, for bit fieldsstopBit
- the stop bit, for bit fields
String getString(byte[] buf, int offset, int length, int startBit, int stopBit)
buf
- the byte array containing the fieldoffset
- the field offsetlength
- the length of the field datastartBit
- the start bit, for bit fieldsstopBit
- the stop bit, for bit fields
String getString(byte[] buf, int offset, int length, int startBit, int stopBit, Charset charset)
buf
- the byte array containing the fieldoffset
- the field offsetlength
- the length of the field datastartBit
- the start bit, for bit fieldsstopBit
- the stop bit, for bit fieldscharset
- the character set to use when converting bytes to characters
void setString(String value, int offset, int length, ByteBuffer buffer, boolean isRightJustified)
value
- the field valueoffset
- the field offsetbuf
- isRightJustified
- void setString(String value, int offset, int length, ByteBuffer buffer, boolean isRightJustified, Charset charset)
value
- the field valueoffset
- the field offsetlength
- the length of the field databuffer
- isRightJustified
- void setInt(int value, int offset, int length, ByteBuffer buffer, boolean isRightJustified)
value
- the field valueoffset
- the field offsetlength
- the length of the field databuffer
- isRightJustified
- void setDouble(double value, int offset, int length, ByteBuffer buffer, boolean isRightJustified)
value
- the field valueoffset
- the field offsetlength
- the length of the field databuffer
- isRightJustified
- void setFloat(float value, int offset, int length, ByteBuffer buffer, boolean isRightJustified)
value
- the field valueoffset
- the field offsetlength
- the length of the field databuffer
- isRightJustified
- void setShort(short value, int offset, int length, ByteBuffer buffer, boolean isRightJustified)
value
- the field valueoffset
- the field offsetlength
- the length of the field databuffer
- isRightJustified
- void setByte(byte value, int offset, int length, ByteBuffer buffer, boolean isRightJustified)
value
- the field valueoffset
- the field offsetlength
- the length of the field databuffer
- isRightJustified
- void setLong(long value, int offset, int length, ByteBuffer buffer, boolean isRightJustified)
value
- the field valueoffset
- the field offsetlength
- the length of the field databuffer
- isRightJustified
- void setBigInteger(BigInteger value, int offset, int length, ByteBuffer buffer, boolean isRightJustified)
value
- the field valueoffset
- the field offsetlength
- the length of the field databuffer
- isRightJustified
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |