public abstract class Data extends Object implements FitsElement
Modifier and Type | Field and Description |
---|---|
protected int |
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 inputstream used.
|
Constructor and Description |
---|
Data() |
Modifier and Type | Method and Description |
---|---|
abstract Object |
getData()
Return the data array object.
|
long |
getFileOffset()
Get the file offset
|
Object |
getKernel()
Return the non-FITS data object
|
long |
getSize()
Get the size of the data element in bytes
|
abstract void |
read(ArrayDataInput i)
Read a data array into the current object and if needed position
to the beginning of the next FITS block.
|
void |
rewrite()
Rewrite the contents of the element in place.
|
boolean |
rewriteable()
Can this element be rewritten?
|
protected void |
setFileOffset(Object 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 int dataSize
protected RandomAccess input
public long getFileOffset()
getFileOffset
in interface FitsElement
protected void setFileOffset(Object o)
public abstract void write(ArrayDataOutput o) throws FitsException
write
in interface FitsElement
o
- The output stream on which to write the data.FitsException
public abstract void read(ArrayDataInput i) throws FitsException
read
in interface FitsElement
i
- The input data streamFitsException
public void rewrite() throws FitsException
FitsElement
rewrite
in interface FitsElement
FitsException
public boolean rewriteable()
FitsElement
rewriteable
in interface FitsElement
public long getSize()
getSize
in interface FitsElement
public abstract Object getData() throws FitsException
FitsException
public Object getKernel() throws FitsException
FitsException
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.