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.Longs
s.
-
-
Field Summary
Fields Modifier and Type Field Description private int
typeBytes
(package private) static UintVectorCoder
UINT32
An instance of anUintVectorCoder
which encodes/decodesuint32
s.(package private) static UintVectorCoder
UINT64
An instance of anUintVectorCoder
which encodes/decodesuint64
s.
-
Constructor Summary
Constructors Modifier Constructor Description private
UintVectorCoder(int typeBytes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PrimitiveArrays.Longs
decode(PrimitiveArrays.Bytes data, PrimitiveArrays.Cursor cursor)
void
encode(PrimitiveArrays.Longs values, java.io.OutputStream output)
Encodesvalue
tooutput
.
-
-
-
Field Detail
-
UINT32
static final UintVectorCoder UINT32
An instance of anUintVectorCoder
which encodes/decodesuint32
s.
-
UINT64
static final UintVectorCoder UINT64
An instance of anUintVectorCoder
which encodes/decodesuint64
s.
-
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:S2Coder
Encodesvalue
tooutput
.- Specified by:
encode
in interfaceS2Coder<PrimitiveArrays.Longs>
- Throws:
java.io.IOException
-
decode
public PrimitiveArrays.Longs decode(PrimitiveArrays.Bytes data, PrimitiveArrays.Cursor cursor)
Description copied from interface:S2Coder
Decodes a value of typeS2Coder
fromdata
starting atcursor.position
.cursor.position
is updated to the position of the first byte indata
following the encoded value.- Specified by:
decode
in interfaceS2Coder<PrimitiveArrays.Longs>
-
-