1 /** This inteface describes allows uses to easily perform
8 import java.io.IOException;
10 public interface FitsElement {
12 /** Read the contents of the element from an input source.
13 * @param in The input source.
15 public void read(ArrayDataInput in) throws FitsException, IOException;
17 /** Write the contents of the element to a data sink.
18 * @param out The data sink.
20 public void write(ArrayDataOutput out) throws FitsException, IOException;
22 /** Rewrite the contents of the element in place.
23 * The data must have been orignally read from a random
24 * access device, and the size of the element may not have changed.
26 public void rewrite() throws FitsException, IOException;
28 /** Get the byte at which this element begins.
29 * This is only available if the data is originally read from
30 * a random access medium.
32 public long getFileOffset();
34 /** Can this element be rewritten? */
35 public boolean rewriteable();
37 /** The size of this element in bytes */
38 public long getSize();
40 /** Reset the input stream to point to the beginning of this element
41 * @return True if the reset succeeded.
43 public boolean reset();