|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.pds.label.object.DataObject
public abstract class DataObject
Defines a base type for objects within a label.
Constructor Summary | |
---|---|
protected |
DataObject(File parentDir,
File fileObject,
long offset,
long size)
|
Method Summary | |
---|---|
ByteBuffer |
getBuffer()
Gets a ByteBuffer for accessing the data object. |
File |
getDataFile()
Gets a file that refers to the data file for this object. |
InputStream |
getInputStream()
Gets an input stream to the data object. |
long |
getOffset()
Gets the offset within the data file where the object data begins. |
long |
getSize()
Gets the size of the data object within the data file. |
protected void |
setSize(long newSize)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected DataObject(File parentDir, File fileObject, long offset, long size)
Method Detail |
---|
public File getDataFile()
File
for the file containing the data objectpublic long getOffset()
public long getSize()
protected void setSize(long newSize)
public InputStream getInputStream() throws FileNotFoundException, IOException
FileNotFoundException
- if the data file cannot be found
IOException
- if there is an error reading the data filepublic ByteBuffer getBuffer() throws FileNotFoundException, IOException
ByteBuffer
for accessing the data object. The buffer is
read-only, and represents only the portion of the data file containing
the data object.
ByteBuffer
for reading bytes from the data object
FileNotFoundException
- if the data file cannot be found
IOException
- if there is an error reading the data file
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |