public class ShapeByteWriter
extends java.lang.Object
This is a wrapper around DynamicByteArray that translates to 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 |
|---|
ShapeByteWriter(DynamicByteArray bytes) |
| Modifier and Type | Method and Description |
|---|---|
DynamicByteArray |
getBytes()
Returns the underlying DynamicByteArray.
|
void |
writeBounds(XyBounds bounds)
Write an XyBounds as four doubles.
|
void |
writeDouble(double value)
Write a Double, which is stored as an 8-byte little-endian float.
|
void |
writeDoubleArray(double[] array)
Writes an array of doubles in the same manner as writeDouble().
|
void |
writeInteger(int value)
Write an Integer, which is stored as a 4-byte signed little-endian int.
|
void |
writeIntegerArray(int[] array)
Writes an array of integers in the same manner as writeInteger().
|
void |
writePackedInteger(long value)
Write a packed integer value.
|
void |
writePoint(XyPoint point)
Write an XyPoint as two Doubles.
|
void |
writePointZ(XyzPoint point)
Write an XyzPoint as two Doubles.
|
public ShapeByteWriter(DynamicByteArray bytes)
public void writeInteger(int value)
public void writeIntegerArray(int[] array)
public void writeDouble(double value)
public void writeDoubleArray(double[] array)
public void writePackedInteger(long value)
The higher precision allowed by Arc/SDE 9.2 means that this requires an 8-byte input value.
public void writePointZ(XyzPoint point)
public void writePoint(XyPoint point)
public void writeBounds(XyBounds bounds)
public DynamicByteArray getBytes()