public class SafeFieldAdapter
extends java.lang.Object
implements gov.nasa.pds.objectAccess.table.FieldAdapter
Currently only the get* methods are so wrapped,
since the set* methods are (a) less likely to encounter
problems from data and (b) not used by this package.
| Constructor and Description |
|---|
SafeFieldAdapter(gov.nasa.pds.objectAccess.table.FieldAdapter base)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.math.BigInteger |
getBigInteger(byte[] buf,
int offset,
int length,
int startBit,
int stopBit) |
byte |
getByte(byte[] buf,
int offset,
int length,
int startBit,
int stopBit) |
double |
getDouble(byte[] buf,
int offset,
int length,
int startBit,
int stopBit) |
float |
getFloat(byte[] buf,
int offset,
int length,
int startBit,
int stopBit) |
int |
getInt(byte[] buf,
int offset,
int length,
int startBit,
int stopBit) |
long |
getLong(byte[] buf,
int offset,
int length,
int startBit,
int stopBit) |
short |
getShort(byte[] buf,
int offset,
int length,
int startBit,
int stopBit) |
java.lang.String |
getString(byte[] buf,
int offset,
int length,
int startBit,
int stopBit) |
java.lang.String |
getString(byte[] buf,
int offset,
int length,
int startBit,
int stopBit,
java.nio.charset.Charset charset) |
void |
setBigInteger(java.math.BigInteger value,
int offset,
int length,
java.nio.ByteBuffer buf,
boolean isRightJustified) |
void |
setByte(byte value,
int offset,
int length,
java.nio.ByteBuffer buf,
boolean isRightJustified) |
void |
setDouble(double value,
int offset,
int length,
java.nio.ByteBuffer buf,
boolean isRightJustified) |
void |
setFloat(float value,
int offset,
int length,
java.nio.ByteBuffer buf,
boolean isRightJustified) |
void |
setInt(int value,
int offset,
int length,
java.nio.ByteBuffer buffer,
boolean isRightJustified) |
void |
setLong(long value,
int offset,
int length,
java.nio.ByteBuffer buf,
boolean isRightJustified) |
void |
setShort(short value,
int offset,
int length,
java.nio.ByteBuffer buf,
boolean isRightJustified) |
void |
setString(java.lang.String value,
int offset,
int length,
java.nio.ByteBuffer buf,
boolean isRightJustified) |
void |
setString(java.lang.String value,
int offset,
int length,
java.nio.ByteBuffer buf,
boolean isRightJustified,
java.nio.charset.Charset charset) |
public SafeFieldAdapter(gov.nasa.pds.objectAccess.table.FieldAdapter base)
base - instance on which this object's behaviour is basedpublic byte getByte(byte[] buf,
int offset,
int length,
int startBit,
int stopBit)
getByte in interface gov.nasa.pds.objectAccess.table.FieldAdapterpublic short getShort(byte[] buf,
int offset,
int length,
int startBit,
int stopBit)
getShort in interface gov.nasa.pds.objectAccess.table.FieldAdapterpublic int getInt(byte[] buf,
int offset,
int length,
int startBit,
int stopBit)
getInt in interface gov.nasa.pds.objectAccess.table.FieldAdapterpublic long getLong(byte[] buf,
int offset,
int length,
int startBit,
int stopBit)
getLong in interface gov.nasa.pds.objectAccess.table.FieldAdapterpublic java.math.BigInteger getBigInteger(byte[] buf,
int offset,
int length,
int startBit,
int stopBit)
getBigInteger in interface gov.nasa.pds.objectAccess.table.FieldAdapterpublic float getFloat(byte[] buf,
int offset,
int length,
int startBit,
int stopBit)
getFloat in interface gov.nasa.pds.objectAccess.table.FieldAdapterpublic double getDouble(byte[] buf,
int offset,
int length,
int startBit,
int stopBit)
getDouble in interface gov.nasa.pds.objectAccess.table.FieldAdapterpublic java.lang.String getString(byte[] buf,
int offset,
int length,
int startBit,
int stopBit)
getString in interface gov.nasa.pds.objectAccess.table.FieldAdapterpublic java.lang.String getString(byte[] buf,
int offset,
int length,
int startBit,
int stopBit,
java.nio.charset.Charset charset)
getString in interface gov.nasa.pds.objectAccess.table.FieldAdapterpublic void setString(java.lang.String value,
int offset,
int length,
java.nio.ByteBuffer buf,
boolean isRightJustified)
setString in interface gov.nasa.pds.objectAccess.table.FieldAdapterpublic void setString(java.lang.String value,
int offset,
int length,
java.nio.ByteBuffer buf,
boolean isRightJustified,
java.nio.charset.Charset charset)
setString in interface gov.nasa.pds.objectAccess.table.FieldAdapterpublic void setInt(int value,
int offset,
int length,
java.nio.ByteBuffer buffer,
boolean isRightJustified)
setInt in interface gov.nasa.pds.objectAccess.table.FieldAdapterpublic void setDouble(double value,
int offset,
int length,
java.nio.ByteBuffer buf,
boolean isRightJustified)
setDouble in interface gov.nasa.pds.objectAccess.table.FieldAdapterpublic void setFloat(float value,
int offset,
int length,
java.nio.ByteBuffer buf,
boolean isRightJustified)
setFloat in interface gov.nasa.pds.objectAccess.table.FieldAdapterpublic void setShort(short value,
int offset,
int length,
java.nio.ByteBuffer buf,
boolean isRightJustified)
setShort in interface gov.nasa.pds.objectAccess.table.FieldAdapterpublic void setByte(byte value,
int offset,
int length,
java.nio.ByteBuffer buf,
boolean isRightJustified)
setByte in interface gov.nasa.pds.objectAccess.table.FieldAdapterpublic void setLong(long value,
int offset,
int length,
java.nio.ByteBuffer buf,
boolean isRightJustified)
setLong in interface gov.nasa.pds.objectAccess.table.FieldAdapterpublic void setBigInteger(java.math.BigInteger value,
int offset,
int length,
java.nio.ByteBuffer buf,
boolean isRightJustified)
setBigInteger in interface gov.nasa.pds.objectAccess.table.FieldAdapter