Package net.postgis.jdbc.geometry.binary
Class ValueGetter
- java.lang.Object
-
- net.postgis.jdbc.geometry.binary.ValueGetter
-
- Direct Known Subclasses:
ValueGetter.NDR,ValueGetter.XDR
public abstract class ValueGetter extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classValueGetter.NDRstatic classValueGetter.XDR
-
Field Summary
Fields Modifier and Type Field Description byteendian
-
Constructor Summary
Constructors Constructor Description ValueGetter(ByteGetter data, byte endian)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description bytegetByte()Get a byte, should be equal for all endiansdoublegetDouble()Get a double.intgetInt()protected abstract intgetInt(int index)Get a 32-Bit integerlonggetLong()protected abstract longgetLong(int index)Get a long value.
-
-
-
Constructor Detail
-
ValueGetter
public ValueGetter(ByteGetter data, byte endian)
-
-
Method Detail
-
getByte
public byte getByte()
Get a byte, should be equal for all endians- Returns:
- the byte value
-
getInt
public int getInt()
-
getLong
public long getLong()
-
getInt
protected abstract int getInt(int index)
Get a 32-Bit integer- Parameters:
index- the index to get the value from- Returns:
- the int value
-
getLong
protected abstract long getLong(int index)
Get a long value. This is not needed directly, but as a nice side-effect from GetDouble.- Parameters:
index- the index to get the value from- Returns:
- the long value
-
getDouble
public double getDouble()
Get a double.- Returns:
- the double value
-
-