CompressedGeometryFile.public class CompressedGeometryFile extends Object
| Constructor and Description |
|---|
CompressedGeometryFile(RandomAccessFile file)
Deprecated.
Construct a new CompressedGeometryFile instance associated with a
currently open RandomAccessFile.
|
CompressedGeometryFile(String file)
Deprecated.
Construct a new CompressedGeometryFile instance associated with the
specified file.
|
CompressedGeometryFile(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.
|
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.
|
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.
|
CompressedGeometry |
readNext()
Deprecated.
Read the next compressed geometry object in the instance.
|
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.
|
public CompressedGeometryFile(String file) throws IOException
file - path to the compressed geometry resource fileFileNotFoundException - if file doesn't exist or
cannot be readIllegalArgumentException - if the file is not a compressed
geometry resource fileIOException - if there is a header or directory read errorpublic CompressedGeometryFile(String file, boolean rw) throws 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 accessFileNotFoundException - if file doesn't exist or
access permissions disallow accessIllegalArgumentException - if the file is not a compressed
geometry resource fileIOException - if there is a header or directory read errorpublic CompressedGeometryFile(RandomAccessFile file) throws IOException
file - currently open RandomAccessFileIllegalArgumentException - if the file is not a compressed
geometry resource fileIOException - if there is a header or directory read errorpublic void clear()
throws IOException
IOException - if clear failspublic String getFileName()
public int getMajorVersionNumber()
public int getMinorVersionNumber()
public int getMinorMinorVersionNumber()
public int getObjectCount()
public int getCurrentIndex()
public CompressedGeometry readNext() throws IOException
IOException - if read failspublic CompressedGeometry[] read() throws IOException
IOException - if read failspublic CompressedGeometry read(int index) throws IOException
index - compressed geometry object to readIndexOutOfBoundsException - if object index is
out of rangeIOException - if read failspublic void write(CompressedGeometry cg) throws IOException
cg - a compressed geometry node componentCapabilityNotSetException - if unable to get compressed
geometry data from the node componentIOException - if write failspublic void write(CompressedGeometryHeader cgh, byte[] geometry) throws IOException
cgh - a CompressedGeometryHeader object describing the data.geometry - the compressed geometry dataIOException - if write failspublic void close()
Copyright © 2016–2022 SciJava. All rights reserved.