Package com.google.common.geometry
Class UintVectorCoder
java.lang.Object
com.google.common.geometry.UintVectorCoder
- All Implemented Interfaces:
S2Coder<PrimitiveArrays.Longs>
An encoder/decoder of
PrimitiveArrays.Longss.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int(package private) static final UintVectorCoderAn instance of anUintVectorCoderwhich encodes/decodesuint32s.(package private) static final UintVectorCoderAn instance of anUintVectorCoderwhich encodes/decodesuint64s. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondecode(PrimitiveArrays.Bytes data, PrimitiveArrays.Cursor cursor) voidencode(PrimitiveArrays.Longs values, OutputStream output) Encodesvaluetooutput.
-
Field Details
-
UINT32
An instance of anUintVectorCoderwhich encodes/decodesuint32s. -
UINT64
An instance of anUintVectorCoderwhich encodes/decodesuint64s. -
typeBytes
private final int typeBytes
-
-
Constructor Details
-
UintVectorCoder
private UintVectorCoder(int typeBytes)
-
-
Method Details
-
encode
Description copied from interface:S2CoderEncodesvaluetooutput.- Specified by:
encodein interfaceS2Coder<PrimitiveArrays.Longs>- Throws:
IOException
-
decode
Description copied from interface:S2CoderDecodes a value of typeS2Coderfromdatastarting atcursor.position.cursor.positionis updated to the position of the first byte indatafollowing the encoded value.- Specified by:
decodein interfaceS2Coder<PrimitiveArrays.Longs>
-