public class IntegerAdapter extends Object implements DataTypeAdapter
| Constructor and Description |
|---|
IntegerAdapter(int elementSize,
boolean isBigEndian,
boolean isUnsigned)
Creates a new adapter for an integer of given size.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getDouble(ByteBuffer buf)
Gets the value as a double.
|
int |
getInt(ByteBuffer buf)
Gets the value as an int.
|
long |
getLong(ByteBuffer buf)
Gets the value as a long.
|
public IntegerAdapter(int elementSize,
boolean isBigEndian,
boolean isUnsigned)
elementSize - the number of bytes in the integerisBigEndian - true, if the data is big-endian, false if little-endianisUnsigned - true, if the data is unsigned, false if signedpublic int getInt(ByteBuffer buf)
DataTypeAdaptergetInt in interface DataTypeAdapterbuf - the buffer from which to get the valuepublic long getLong(ByteBuffer buf)
DataTypeAdaptergetLong in interface DataTypeAdapterbuf - the buffer from which to get the valuepublic double getDouble(ByteBuffer buf)
DataTypeAdaptergetDouble in interface DataTypeAdapterbuf - the buffer from which to get the valueCopyright © 2010–2017 Planetary Data System. All rights reserved.