public class NumericTextFieldAdapter extends DefaultFieldAdapter
Modifier and Type | Field and Description |
---|---|
int |
radix |
Constructor and Description |
---|
NumericTextFieldAdapter(int radix) |
Modifier and Type | Method and Description |
---|---|
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.
|
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.
|
public byte getByte(byte[] buf, int offset, int length, int startBit, int stopBit)
FieldAdapter
getByte
in interface FieldAdapter
getByte
in class DefaultFieldAdapter
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 fieldspublic short getShort(byte[] buf, int offset, int length, int startBit, int stopBit)
FieldAdapter
getShort
in interface FieldAdapter
getShort
in class DefaultFieldAdapter
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 fieldspublic int getInt(byte[] buf, int offset, int length, int startBit, int stopBit)
FieldAdapter
getInt
in interface FieldAdapter
getInt
in class DefaultFieldAdapter
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 fieldspublic long getLong(byte[] buf, int offset, int length, int startBit, int stopBit)
FieldAdapter
getLong
in interface FieldAdapter
getLong
in class DefaultFieldAdapter
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 fieldspublic float getFloat(byte[] buf, int offset, int length, int startBit, int stopBit)
FieldAdapter
getFloat
in interface FieldAdapter
getFloat
in class DefaultFieldAdapter
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 fieldspublic double getDouble(byte[] buf, int offset, int length, int startBit, int stopBit)
FieldAdapter
getDouble
in interface FieldAdapter
getDouble
in class DefaultFieldAdapter
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 fieldspublic BigInteger getBigInteger(byte[] buf, int offset, int length, int startBit, int stopBit)
FieldAdapter
getBigInteger
in interface FieldAdapter
getBigInteger
in class DefaultFieldAdapter
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 fieldsBigInteger
public void setByte(byte value, int offset, int length, ByteBuffer buffer, boolean isRightJustified)
FieldAdapter
setByte
in interface FieldAdapter
setByte
in class DefaultFieldAdapter
value
- the field valueoffset
- the field offsetlength
- the length of the valuebuffer
- the byte buffer into which to set the valueisRightJustified
- true, if the string value should be right-justifiedpublic void setShort(short value, int offset, int length, ByteBuffer buffer, boolean isRightJustified)
FieldAdapter
setShort
in interface FieldAdapter
setShort
in class DefaultFieldAdapter
value
- the field valueoffset
- the field offsetlength
- the length of the valuebuffer
- the byte buffer into which to set the valueisRightJustified
- true, if the string value should be right-justifiedpublic void setInt(int value, int offset, int length, ByteBuffer buffer, boolean isRightJustified)
FieldAdapter
setInt
in interface FieldAdapter
setInt
in class DefaultFieldAdapter
value
- the field valueoffset
- the field offsetlength
- the length of the valuebuffer
- the byte buffer into which to set the valueisRightJustified
- true, if the string value should be right-justifiedpublic void setLong(long value, int offset, int length, ByteBuffer buffer, boolean isRightJustified)
FieldAdapter
setLong
in interface FieldAdapter
setLong
in class DefaultFieldAdapter
value
- the field valueoffset
- the field offsetlength
- the length of the valuebuffer
- the byte buffer into which to set the valueisRightJustified
- true, if the string value should be right-justifiedpublic void setFloat(float value, int offset, int length, ByteBuffer buffer, boolean isRightJustified)
FieldAdapter
setFloat
in interface FieldAdapter
setFloat
in class DefaultFieldAdapter
value
- the field valueoffset
- the field offsetlength
- the length of the valuebuffer
- the byte buffer into which to set the valueisRightJustified
- true, if the string value should be right-justifiedpublic void setDouble(double value, int offset, int length, ByteBuffer buffer, boolean isRightJustified)
FieldAdapter
setDouble
in interface FieldAdapter
setDouble
in class DefaultFieldAdapter
value
- the field valueoffset
- the field offsetlength
- the length of the valuebuffer
- the byte buffer into which to set the valueisRightJustified
- true, if the string value should be right-justifiedpublic void setBigInteger(BigInteger value, int offset, int length, ByteBuffer buffer, boolean isRightJustified)
FieldAdapter
setBigInteger
in interface FieldAdapter
setBigInteger
in class DefaultFieldAdapter
value
- the field valueoffset
- the field offsetlength
- the length of the valuebuffer
- the byte buffer into which to set the valueisRightJustified
- true, if the string value should be right-justifiedCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.