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 FitsElementprotected void setFileOffset(Object o)
public abstract void write(ArrayDataOutput o) throws FitsException
write in interface FitsElemento - The output stream on which to write the data.FitsExceptionpublic abstract void read(ArrayDataInput i) throws FitsException
read in interface FitsElementi - The input data streamFitsExceptionpublic void rewrite()
throws FitsException
FitsElementrewrite in interface FitsElementFitsExceptionpublic boolean rewriteable()
FitsElementrewriteable in interface FitsElementpublic long getSize()
getSize in interface FitsElementpublic abstract Object getData() throws FitsException
FitsExceptionpublic Object getKernel() throws FitsException
FitsExceptionCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.