Class ValueSetter
- java.lang.Object
-
- io.github.sebasbaumh.postgis.binary.ValueSetter
-
public class ValueSetter extends java.lang.Object
Allows writing values in little endian encoding.- Author:
- sbaumhekel
-
-
Constructor Summary
Constructors Constructor Description ValueSetter(ByteSetter data)
Constructs an instance on the givenByteSetter
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte
getEndian()
Gets the endian encoding.void
setByte(byte value)
Set a byte, should be equal for all endiansvoid
setDouble(double data)
Set a double.void
setInt(int value)
Set a 32-Bit integervoid
setLong(long value)
Set a long value.java.lang.String
toString()
-
-
-
Constructor Detail
-
ValueSetter
public ValueSetter(ByteSetter data)
Constructs an instance on the givenByteSetter
.- Parameters:
data
-ByteSetter
-
-
Method Detail
-
getEndian
public byte getEndian()
Gets the endian encoding.- Returns:
- endian encoding
-
setByte
public void setByte(byte value)
Set a byte, should be equal for all endians- Parameters:
value
- byte value to be set with.
-
setDouble
public void setDouble(double data)
Set a double.- Parameters:
data
- double value to be set with
-
setInt
public void setInt(int value)
Set a 32-Bit integer- Parameters:
value
- int value to be set with
-
setLong
public void setLong(long value)
Set a long value. This is not needed directly, but as a nice side-effect from setDouble.- Parameters:
value
- value value to be set with
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-