CompressedGeometryFile.public class CompressedGeometryFile
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
(package private) static int |
ALPHA_PRESENT_MASK
Deprecated.
Bit in compressed geometry data descriptor encoding presence of alphas.
|
private static boolean |
benchmark
Deprecated.
|
(package private) static int |
BLOCK_HEADER_SIZE
Deprecated.
Block header total size in bytes.
|
(package private) int |
bufferNextObjectCount
Deprecated.
|
(package private) int |
bufferNextObjectOffset
Deprecated.
|
(package private) int |
bufferObjectCount
Deprecated.
|
(package private) int |
bufferObjectStart
Deprecated.
|
(package private) byte[] |
cgBuffer
Deprecated.
|
(package private) java.io.RandomAccessFile |
cgFile
Deprecated.
|
(package private) CompressedGeometryHeader |
cgh
Deprecated.
|
(package private) static int |
COLOR_PRESENT_MASK
Deprecated.
Bit in compressed geometry data descriptor encoding presence of colors.
|
(package private) long[] |
directory
Deprecated.
|
(package private) static int |
DIRECTORY_OFFSET_OFFSET
Deprecated.
Byte offset of the directory offset from start of file.
|
(package private) long |
directoryOffset
Deprecated.
|
(package private) java.lang.String |
fileName
Deprecated.
|
(package private) boolean |
fileUpdate
Deprecated.
|
(package private) static int |
GEOM_DATA_OFFSET
Deprecated.
Byte offset of the compressed geometry data descriptor from start of
individual compressed geometry block.
|
(package private) int |
geomDataType
Deprecated.
|
(package private) int |
geomSize
Deprecated.
|
(package private) int |
geomStart
Deprecated.
|
(package private) static int |
HEADER_SIZE
Deprecated.
File header total size in bytes.
|
(package private) static int |
MAGIC_NUMBER
Deprecated.
The magic number which identifies the compressed geometry file type.
|
(package private) static int |
MAGIC_NUMBER_OFFSET
Deprecated.
Byte offset of the magic number from start of file.
|
(package private) int |
magicNumber
Deprecated.
|
(package private) static int |
MAJOR_VERSION_OFFSET
Deprecated.
Byte offset of the major version number from start of file.
|
(package private) int |
majorVersionNumber
Deprecated.
|
(package private) static int |
MINOR_MINOR_VERSION_OFFSET
Deprecated.
Byte offset of the minor minor version number from start of file.
|
(package private) static int |
MINOR_VERSION_OFFSET
Deprecated.
Byte offset of the minor version number from start of file.
|
(package private) int |
minorMinorVersionNumber
Deprecated.
|
(package private) int |
minorVersionNumber
Deprecated.
|
(package private) static int |
NORMAL_PRESENT_MASK
Deprecated.
Bit in compressed geometry data descriptor encoding presence of normals.
|
(package private) static int |
OBJECT_COUNT_OFFSET
Deprecated.
Byte offset of the number of objects from start of file.
|
(package private) static int |
OBJECT_SIZE_OFFSET
Deprecated.
Byte offset of the object size from start of individual compressed
geometry block.
|
(package private) int |
objectCount
Deprecated.
|
(package private) int |
objectIndex
Deprecated.
|
(package private) int[] |
objectSizes
Deprecated.
|
private static boolean |
print
Deprecated.
|
(package private) static int |
TYPE_LINE
Deprecated.
Value in compressed geometry data descriptor for a line buffer type.
|
(package private) static int |
TYPE_MASK
Deprecated.
Bits in compressed geometry data descriptor which encode the buffer type.
|
(package private) static int |
TYPE_POINT
Deprecated.
Value in compressed geometry data descriptor for a point buffer type.
|
(package private) static int |
TYPE_TRIANGLE
Deprecated.
Value in compressed geometry data descriptor for a triangle buffer type.
|
| Constructor and Description |
|---|
CompressedGeometryFile(java.io.RandomAccessFile file)
Deprecated.
Construct a new CompressedGeometryFile instance associated with a
currently open RandomAccessFile.
|
CompressedGeometryFile(java.lang.String file)
Deprecated.
Construct a new CompressedGeometryFile instance associated with the
specified file.
|
CompressedGeometryFile(java.lang.String file,
boolean rw)
Deprecated.
Construct a new CompressedGeometryFile instance associated with the
specified file.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Deprecated.
Delete all compressed objects from this instance.
|
void |
close()
Deprecated.
Release the resources associated with this instance.
|
protected void |
finalize()
Deprecated.
Release file resources when this object is garbage collected.
|
int |
getCurrentIndex()
Deprecated.
Return the current object index associated with this instance.
|
java.lang.String |
getFileName()
Deprecated.
Return a string containing the file name associated with this instance
or null if there is none.
|
int |
getMajorVersionNumber()
Deprecated.
Return the major version number of the most recent compressor used to
compress any of the objects in this instance.
|
int |
getMinorMinorVersionNumber()
Deprecated.
Return the subminor version number of the most recent compressor used to
compress any of the objects in this instance.
|
int |
getMinorVersionNumber()
Deprecated.
Return the minor version number of the most recent compressor used to
compress any of the objects in this instance.
|
int |
getObjectCount()
Deprecated.
Return the number of compressed objects in this instance.
|
(package private) void |
initialize()
Deprecated.
|
(package private) CompressedGeometry |
newCG(int geomSize,
int geomStart,
int geomDataType)
Deprecated.
|
(package private) void |
open(java.lang.String fname,
boolean rw)
Deprecated.
|
CompressedGeometry[] |
read()
Deprecated.
Read all compressed geometry objects contained in the instance.
|
CompressedGeometry |
read(int index)
Deprecated.
Read the compressed geometry object at the specified index.
|
(package private) void |
readDirectory(long offset,
long[] directory)
Deprecated.
|
(package private) void |
readFileHeader()
Deprecated.
|
CompressedGeometry |
readNext()
Deprecated.
Read the next compressed geometry object in the instance.
|
(package private) CompressedGeometry |
readNext(int bufferReadLimit)
Deprecated.
|
(package private) void |
setFilePointer(long offset)
Deprecated.
|
void |
write(CompressedGeometry cg)
Deprecated.
Add a compressed geometry node component to the end of the instance.
|
void |
write(CompressedGeometryHeader cgh,
byte[] geometry)
Deprecated.
Add a buffer of compressed geometry data to the end of the
resource.
|
(package private) void |
writeFileDirectory()
Deprecated.
|
(package private) void |
writeFileHeader()
Deprecated.
|
private static final boolean print
private static final boolean benchmark
static final int MAGIC_NUMBER
static final int MAGIC_NUMBER_OFFSET
static final int MAJOR_VERSION_OFFSET
static final int MINOR_VERSION_OFFSET
static final int MINOR_MINOR_VERSION_OFFSET
static final int OBJECT_COUNT_OFFSET
static final int DIRECTORY_OFFSET_OFFSET
static final int HEADER_SIZE
static final int OBJECT_SIZE_OFFSET
static final int GEOM_DATA_OFFSET
static final int TYPE_MASK
static final int NORMAL_PRESENT_MASK
static final int COLOR_PRESENT_MASK
static final int ALPHA_PRESENT_MASK
static final int TYPE_POINT
static final int TYPE_LINE
static final int TYPE_TRIANGLE
static final int BLOCK_HEADER_SIZE
java.lang.String fileName
int majorVersionNumber
int minorVersionNumber
int minorMinorVersionNumber
int objectCount
int objectIndex
java.io.RandomAccessFile cgFile
int magicNumber
byte[] cgBuffer
int geomSize
int geomStart
int geomDataType
long[] directory
long directoryOffset
int[] objectSizes
int bufferObjectStart
int bufferObjectCount
int bufferNextObjectCount
int bufferNextObjectOffset
CompressedGeometryHeader cgh
boolean fileUpdate
public CompressedGeometryFile(java.lang.String file)
throws java.io.IOException
file - path to the compressed geometry resource filejava.io.FileNotFoundException - if file doesn't exist or
cannot be readjava.lang.IllegalArgumentException - if the file is not a compressed
geometry resource filejava.io.IOException - if there is a header or directory read errorpublic CompressedGeometryFile(java.lang.String file,
boolean rw)
throws java.io.IOException
file - path to the compressed geometry resource filerw - if true, opens the file for read and write access or attempts
to create one if it doesn't exist; if false, opens the file with
read-only accessjava.io.FileNotFoundException - if file doesn't exist or
access permissions disallow accessjava.lang.IllegalArgumentException - if the file is not a compressed
geometry resource filejava.io.IOException - if there is a header or directory read errorpublic CompressedGeometryFile(java.io.RandomAccessFile file)
throws java.io.IOException
file - currently open RandomAccessFilejava.lang.IllegalArgumentException - if the file is not a compressed
geometry resource filejava.io.IOException - if there is a header or directory read errorpublic void clear()
throws java.io.IOException
java.io.IOException - if clear failspublic java.lang.String getFileName()
public int getMajorVersionNumber()
public int getMinorVersionNumber()
public int getMinorMinorVersionNumber()
public int getObjectCount()
public int getCurrentIndex()
public CompressedGeometry readNext() throws java.io.IOException
java.io.IOException - if read failspublic CompressedGeometry[] read() throws java.io.IOException
java.io.IOException - if read failspublic CompressedGeometry read(int index) throws java.io.IOException
index - compressed geometry object to readjava.lang.IndexOutOfBoundsException - if object index is
out of rangejava.io.IOException - if read failspublic void write(CompressedGeometry cg) throws java.io.IOException
cg - a compressed geometry node componentCapabilityNotSetException - if unable to get compressed
geometry data from the node componentjava.io.IOException - if write failspublic void write(CompressedGeometryHeader cgh, byte[] geometry) throws java.io.IOException
cgh - a CompressedGeometryHeader object describing the data.geometry - the compressed geometry datajava.io.IOException - if write failspublic void close()
void open(java.lang.String fname,
boolean rw)
throws java.io.FileNotFoundException,
java.io.IOException
java.io.FileNotFoundExceptionjava.io.IOExceptionvoid setFilePointer(long offset)
throws java.io.IOException
java.io.IOExceptionvoid initialize()
throws java.io.IOException
java.io.IOExceptionvoid readFileHeader()
throws java.io.IOException
java.io.IOExceptionvoid writeFileHeader()
throws java.io.IOException
java.io.IOExceptionvoid readDirectory(long offset,
long[] directory)
throws java.io.IOException
java.io.IOExceptionvoid writeFileDirectory()
throws java.io.IOException
java.io.IOExceptionCompressedGeometry readNext(int bufferReadLimit) throws java.io.IOException
java.io.IOExceptionCompressedGeometry newCG(int geomSize, int geomStart, int geomDataType)
protected void finalize()
finalize in class java.lang.ObjectCopyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.