|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.pds.objectAccess.table.DefaultFieldAdapter
gov.nasa.pds.objectAccess.table.NumericTextFieldAdapter
public class NumericTextFieldAdapter
Implements a field adapter for numeric fields stored in textual format, as in a character table.
Constructor Summary | |
---|---|
NumericTextFieldAdapter()
|
Method Summary | |
---|---|
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 |
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. |
Methods inherited from class gov.nasa.pds.objectAccess.table.DefaultFieldAdapter |
---|
getString, getString, setString, setString, setString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NumericTextFieldAdapter()
Method Detail |
---|
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 fields
public 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 fields
public 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 fields
public 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 fields
public 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 fields
public 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 fields
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 field datapublic 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 field datapublic 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 field datapublic 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 field datapublic 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 field datapublic 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 field data
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |