public abstract class Data extends Object implements FitsElement
This is the object which contains the actual data for the HDU.
Modifier and Type | Field and Description |
---|---|
protected long |
dataSize
The size of the data when last read
|
protected long |
fileOffset
The starting location of the data when last read
|
protected RandomAccess |
input
The input stream used.
|
Constructor and Description |
---|
Data() |
Modifier and Type | Method and Description |
---|---|
abstract Object |
getData() |
long |
getFileOffset() |
Object |
getKernel() |
long |
getSize() |
abstract void |
read(ArrayDataInput in)
Read a data array into the current object and if needed position to the
beginning of the next FITS block.
|
boolean |
reset()
Reset the input stream to point to the beginning of this element
|
void |
rewrite()
Rewrite the contents of the element in place.
|
boolean |
rewriteable() |
protected void |
setFileOffset(ArrayDataInput o)
Set the fields needed for a re-read.
|
abstract void |
write(ArrayDataOutput o)
Write the data -- including any buffering needed
|
protected long fileOffset
protected long dataSize
protected RandomAccess input
public abstract Object getData() throws FitsException
FitsException
- if the data could not be gathered .public long getFileOffset()
getFileOffset
in interface FitsElement
public Object getKernel() throws FitsException
FitsException
- if the data could not be gathered .public long getSize()
getSize
in interface FitsElement
public abstract void read(ArrayDataInput in) throws FitsException
FitsElement
read
in interface FitsElement
in
- The input data streamFitsException
- if the read was unsuccessful.public boolean reset()
FitsElement
reset
in interface FitsElement
public void rewrite() throws FitsException
FitsElement
rewrite
in interface FitsElement
FitsException
- if the rewrite was unsuccessful.public boolean rewriteable()
rewriteable
in interface FitsElement
true
if this element can be rewritten?protected void setFileOffset(ArrayDataInput o)
o
- reread information.public abstract void write(ArrayDataOutput o) throws FitsException
write
in interface FitsElement
o
- The output stream on which to write the data.FitsException
- if the write was unsuccessful.Copyright © 1996–2016 nom-tam-fits. All rights reserved.