Package com.google.common.geometry
Class UintVectorCoder
- java.lang.Object
-
- com.google.common.geometry.UintVectorCoder
-
- All Implemented Interfaces:
S2Coder<PrimitiveArrays.Longs>
@GwtCompatible class UintVectorCoder extends java.lang.Object implements S2Coder<PrimitiveArrays.Longs>
An encoder/decoder ofPrimitiveArrays.Longss.
-
-
Field Summary
Fields Modifier and Type Field Description private inttypeBytes(package private) static UintVectorCoderUINT32An instance of anUintVectorCoderwhich encodes/decodesuint32s.(package private) static UintVectorCoderUINT64An instance of anUintVectorCoderwhich encodes/decodesuint64s.
-
Constructor Summary
Constructors Modifier Constructor Description privateUintVectorCoder(int typeBytes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PrimitiveArrays.Longsdecode(PrimitiveArrays.Bytes data, PrimitiveArrays.Cursor cursor)voidencode(PrimitiveArrays.Longs values, java.io.OutputStream output)Encodesvaluetooutput.
-
-
-
Field Detail
-
UINT32
static final UintVectorCoder UINT32
An instance of anUintVectorCoderwhich encodes/decodesuint32s.
-
UINT64
static final UintVectorCoder UINT64
An instance of anUintVectorCoderwhich encodes/decodesuint64s.
-
typeBytes
private final int typeBytes
-
-
Method Detail
-
encode
public void encode(PrimitiveArrays.Longs values, java.io.OutputStream output) throws java.io.IOException
Description copied from interface:S2CoderEncodesvaluetooutput.- Specified by:
encodein interfaceS2Coder<PrimitiveArrays.Longs>- Throws:
java.io.IOException
-
decode
public PrimitiveArrays.Longs decode(PrimitiveArrays.Bytes data, PrimitiveArrays.Cursor cursor)
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>
-
-