public class ShapeByteReader
extends java.lang.Object
This is a wrapper around DynamicByteArray that translates the values used in shapes (generally little-endian 4-byte ints and 8-byte floats) and in SDE binary (generally a compressed integer format that is then scaled and offset to generate a coordinate value).
It also includes some convenience functions for standard structures such as points and boxes (bounds).
Copyright 2007-2008 Partner Software, Inc.
| Constructor and Description |
|---|
ShapeByteReader(byte[] bytes) |
ShapeByteReader(DynamicByteArray bytes) |
| Modifier and Type | Method and Description |
|---|---|
DynamicByteArray |
getBytes()
Returns the underlying DynamicByteArray.
|
XyBounds |
readBounds()
Read an XyBounds as four doubles.
|
double |
readDouble()
Read a Double, which is stored as an 8-byte little-endian float.
|
double[] |
readDoubleArray(int size)
Reads the given number of doubles as an array, in the same manner as
readDouble().
|
int |
readInteger()
Read an Integer, which is stored as a 4-byte signed little-endian int.
|
int[] |
readIntegerArray(int size)
Reads the given number of integers as an array, in the same manner as
readInteger().
|
long |
readPackedInteger()
Read a packed integer value.
|
XyPoint |
readPoint()
Read an XyPoint as two Doubles.
|
XyzPoint |
readPointZ()
Read an XyzPoint as three Doubles.
|
void |
skip(int count)
Skip the given number of bytes.
|
public ShapeByteReader(DynamicByteArray bytes)
public ShapeByteReader(byte[] bytes)
public int readInteger()
public double readDouble()
public int[] readIntegerArray(int size)
public double[] readDoubleArray(int size)
public long readPackedInteger()
The higher precision allowed by Arc/SDE 9.2 means that this requires an 8-byte result value.
public XyPoint readPoint()
public XyzPoint readPointZ()
public XyBounds readBounds()
public void skip(int count)
public DynamicByteArray getBytes()