|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.sun.j3d.utils.compression.CompressedGeometryFile
This class provides methods to read and write compressed geometry resource files. These files usually end with the .cg extension and support sequential as well as random access to multiple compressed geometry objects.
| Constructor Summary | |
CompressedGeometryFile(java.io.RandomAccessFile file)
Construct a new CompressedGeometryFile instance associated with a currently open RandomAccessFile. |
|
CompressedGeometryFile(java.lang.String file)
Construct a new CompressedGeometryFile instance associated with the specified file. |
|
CompressedGeometryFile(java.lang.String file,
boolean rw)
Construct a new CompressedGeometryFile instance associated with the specified file. |
|
| Method Summary | |
void |
clear()
Delete all compressed objects from this instance. |
void |
close()
Release the resources associated with this instance. |
protected void |
finalize()
Release file resources when this object is garbage collected. |
int |
getCurrentIndex()
Return the current object index associated with this instance. |
java.lang.String |
getFileName()
Return a string containing the file name associated with this instance or null if there is none. |
int |
getMajorVersionNumber()
Return the major version number of the most recent compressor used to compress any of the objects in this instance. |
int |
getMinorMinorVersionNumber()
Return the subminor version number of the most recent compressor used to compress any of the objects in this instance. |
int |
getMinorVersionNumber()
Return the minor version number of the most recent compressor used to compress any of the objects in this instance. |
int |
getObjectCount()
Return the number of compressed objects in this instance. |
CompressedGeometry[] |
read()
Read all compressed geometry objects contained in the instance. |
CompressedGeometry |
read(int index)
Read the compressed geometry object at the specified index. |
CompressedGeometry |
readNext()
Read the next compressed geometry object in the instance. |
void |
write(CompressedGeometry cg)
Add a compressed geometry node component to the end of the instance. |
void |
write(CompressedGeometryHeader cgh,
byte[] geometry)
Add a buffer of compressed geometry data to the end of the resource. |
| Methods inherited from class java.lang.Object |
clone,
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public CompressedGeometryFile(java.lang.String file)
throws java.io.IOException
file - path to the compressed geometry resource file
public 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 access
public CompressedGeometryFile(java.io.RandomAccessFile file)
throws java.io.IOException
file - currently open RandomAccessFile| Method Detail |
public void clear()
throws java.io.IOException
public 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
public CompressedGeometry[] read()
throws java.io.IOException
public CompressedGeometry read(int index)
throws java.io.IOException
index - compressed geometry object to read
public void write(CompressedGeometry cg)
throws java.io.IOException
cg - a compressed geometry node component
public void write(CompressedGeometryHeader cgh,
byte[] geometry)
throws java.io.IOException
cgh - a CompressedGeometryHeader object describing the data.geometry - the compressed geometry datapublic void close()
protected void finalize()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||