Package com.google.common.geometry
Class S2Point.Shape.Coder
- java.lang.Object
-
- com.google.common.geometry.S2Point.Shape.Coder
-
- All Implemented Interfaces:
S2Coder<S2Point.Shape>
- Enclosing class:
- S2Point.Shape
@GwtCompatible public static class S2Point.Shape.Coder extends java.lang.Object implements S2Coder<S2Point.Shape>
An encoder/decoder ofS2Point.Shape
s.
-
-
Field Summary
Fields Modifier and Type Field Description private S2PointVectorCoder
coder
(package private) static S2Point.Shape.Coder
COMPACT
(package private) static S2Point.Shape.Coder
FAST
-
Constructor Summary
Constructors Modifier Constructor Description private
Coder(S2PointVectorCoder coder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description S2Point.Shape
decode(PrimitiveArrays.Bytes data, PrimitiveArrays.Cursor cursor)
void
encode(S2Point.Shape shape, java.io.OutputStream output)
Encodesvalue
tooutput
.
-
-
-
Field Detail
-
FAST
static final S2Point.Shape.Coder FAST
-
COMPACT
static final S2Point.Shape.Coder COMPACT
-
coder
private final S2PointVectorCoder coder
-
-
Constructor Detail
-
Coder
private Coder(S2PointVectorCoder coder)
-
-
Method Detail
-
encode
public void encode(S2Point.Shape shape, java.io.OutputStream output) throws java.io.IOException
Description copied from interface:S2Coder
Encodesvalue
tooutput
.- Specified by:
encode
in interfaceS2Coder<S2Point.Shape>
- Throws:
java.io.IOException
-
decode
public S2Point.Shape 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<S2Point.Shape>
-
-