|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.fits.AbstractArrayDataIO
public abstract class AbstractArrayDataIO
Abstract implementation of an implementation of a
nom.tam.util
-compatible FITS I/O handler.
The ArrayDataInput interface contains a lot of methods declared like
int read(type[]) throws IOException;whose behaviour is not documented - when do they throw an exception and what do they return? The behaviour implemented here follows that of the
BufferedFile
implementation (which is similarly
undocumented). It is as follows:
BufferedFile
implementation for more details.
Constructor Summary | |
---|---|
AbstractArrayDataIO()
|
Method Summary | |
---|---|
protected abstract byte |
get()
Reads one byte from the current position. |
protected abstract void |
get(byte[] buf,
int offset,
int length)
Reads bytes into a buffer from the current position. |
abstract long |
length()
Returns the size of this buffer. |
protected abstract void |
put(byte b)
Writes a single byte at the current position. |
protected abstract void |
put(byte[] buf,
int offset,
int length)
Writes bytes from a buffer to the current position. |
int |
read(boolean[] buf)
|
int |
read(boolean[] buf,
int start,
int length)
|
int |
read(byte[] buf)
|
int |
read(byte[] buf,
int start,
int length)
|
int |
read(char[] buf)
|
int |
read(char[] buf,
int start,
int length)
|
int |
read(double[] buf)
|
int |
read(double[] buf,
int start,
int length)
|
int |
read(float[] buf)
|
int |
read(float[] buf,
int start,
int length)
|
int |
read(int[] buf)
|
int |
read(int[] buf,
int start,
int length)
|
int |
read(long[] buf)
|
int |
read(long[] buf,
int start,
int length)
|
int |
read(short[] buf)
|
int |
read(short[] buf,
int start,
int length)
|
int |
readArray(Object o)
|
boolean |
readBoolean()
|
byte |
readByte()
|
char |
readChar()
|
double |
readDouble()
|
float |
readFloat()
|
void |
readFully(byte[] buf)
|
void |
readFully(byte[] buf,
int start,
int len)
Reads a specified number of bytes into an array. |
int |
readInt()
|
String |
readLine()
Deprecated. see DataInputStream.readLine() |
long |
readLong()
|
short |
readShort()
|
int |
readUnsignedByte()
|
int |
readUnsignedShort()
|
String |
readUTF()
|
protected abstract long |
remaining()
Returns the number of bytes remaining between the current position and the end of the file. |
void |
write(boolean[] buf)
|
void |
write(boolean[] buf,
int start,
int length)
|
void |
write(byte[] buf)
|
void |
write(byte[] buf,
int start,
int length)
|
void |
write(char[] buf)
|
void |
write(char[] buf,
int start,
int length)
|
void |
write(double[] buf)
|
void |
write(double[] buf,
int start,
int length)
|
void |
write(float[] buf)
|
void |
write(float[] buf,
int start,
int length)
|
void |
write(int val)
|
void |
write(int[] buf)
|
void |
write(int[] buf,
int start,
int length)
|
void |
write(long[] buf)
|
void |
write(long[] buf,
int start,
int length)
|
void |
write(short[] buf)
|
void |
write(short[] buf,
int start,
int length)
|
void |
write(String[] strings)
|
void |
write(String[] strings,
int start,
int length)
|
void |
writeArray(Object o)
|
void |
writeBoolean(boolean val)
|
void |
writeByte(int val)
|
void |
writeBytes(String s)
|
void |
writeChar(int val)
|
void |
writeChars(String s)
|
void |
writeDouble(double val)
|
void |
writeFloat(float val)
|
void |
writeInt(int val)
|
void |
writeLong(long val)
|
void |
writeShort(int val)
|
void |
writeUTF(String str)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface nom.tam.util.ArrayDataInput |
---|
close, skip |
Methods inherited from interface java.io.DataInput |
---|
skipBytes |
Methods inherited from interface nom.tam.util.ArrayDataOutput |
---|
close, flush |
Constructor Detail |
---|
public AbstractArrayDataIO()
Method Detail |
---|
protected abstract byte get() throws IOException
IOException
protected abstract void get(byte[] buf, int offset, int length) throws IOException
buf
- destination bufferoffset
- offset of first byte in buf
to be writtenlength
- maximum number of bytes to be written to
buf
IOException
protected abstract void put(byte b) throws IOException
b
- output byte
IOException
protected abstract void put(byte[] buf, int offset, int length) throws IOException
buf
- source bufferoffset
- offset of first byte in buf
to be readlength
- number of bytes from buf
to be read
IOException
public abstract long length()
protected abstract long remaining()
Long.MAX_VALUE
;
public boolean readBoolean() throws IOException
readBoolean
in interface DataInput
IOException
public byte readByte() throws IOException
readByte
in interface DataInput
IOException
public short readShort() throws IOException
readShort
in interface DataInput
IOException
public char readChar() throws IOException
readChar
in interface DataInput
IOException
public int readInt() throws IOException
readInt
in interface DataInput
IOException
public long readLong() throws IOException
readLong
in interface DataInput
IOException
public float readFloat() throws IOException
readFloat
in interface DataInput
IOException
public double readDouble() throws IOException
readDouble
in interface DataInput
IOException
public int readUnsignedByte() throws IOException
readUnsignedByte
in interface DataInput
IOException
public int readUnsignedShort() throws IOException
readUnsignedShort
in interface DataInput
IOException
public String readUTF() throws IOException
readUTF
in interface DataInput
IOException
public String readLine() throws IOException
DataInputStream.readLine()
readLine
in interface DataInput
UnsupportedOperationException
IOException
public void readFully(byte[] buf, int start, int len) throws IOException
readFully
in interface DataInput
buf
- the byte buffer into which to readstart
- the index in buf at which to start putting byteslen
- the number of bytes which must be read
EOFException
- if there are fewer than len bytes left
IOException
public int read(byte[] buf, int start, int length) throws IOException
read
in interface nom.tam.util.ArrayDataInput
IOException
public int read(boolean[] buf, int start, int length) throws IOException
read
in interface nom.tam.util.ArrayDataInput
IOException
public int read(short[] buf, int start, int length) throws IOException
read
in interface nom.tam.util.ArrayDataInput
IOException
public int read(char[] buf, int start, int length) throws IOException
read
in interface nom.tam.util.ArrayDataInput
IOException
public int read(int[] buf, int start, int length) throws IOException
read
in interface nom.tam.util.ArrayDataInput
IOException
public int read(long[] buf, int start, int length) throws IOException
read
in interface nom.tam.util.ArrayDataInput
IOException
public int read(float[] buf, int start, int length) throws IOException
read
in interface nom.tam.util.ArrayDataInput
IOException
public int read(double[] buf, int start, int length) throws IOException
read
in interface nom.tam.util.ArrayDataInput
IOException
public void readFully(byte[] buf) throws IOException
readFully
in interface DataInput
IOException
public int read(byte[] buf) throws IOException
read
in interface nom.tam.util.ArrayDataInput
IOException
public int read(boolean[] buf) throws IOException
read
in interface nom.tam.util.ArrayDataInput
IOException
public int read(short[] buf) throws IOException
read
in interface nom.tam.util.ArrayDataInput
IOException
public int read(char[] buf) throws IOException
read
in interface nom.tam.util.ArrayDataInput
IOException
public int read(int[] buf) throws IOException
read
in interface nom.tam.util.ArrayDataInput
IOException
public int read(long[] buf) throws IOException
read
in interface nom.tam.util.ArrayDataInput
IOException
public int read(float[] buf) throws IOException
read
in interface nom.tam.util.ArrayDataInput
IOException
public int read(double[] buf) throws IOException
read
in interface nom.tam.util.ArrayDataInput
IOException
public int readArray(Object o) throws IOException
readArray
in interface nom.tam.util.ArrayDataInput
IOException
public void write(int val) throws IOException
write
in interface DataOutput
IOException
public void writeBoolean(boolean val) throws IOException
writeBoolean
in interface DataOutput
IOException
public void writeByte(int val) throws IOException
writeByte
in interface DataOutput
IOException
public void writeShort(int val) throws IOException
writeShort
in interface DataOutput
IOException
public void writeChar(int val) throws IOException
writeChar
in interface DataOutput
IOException
public void writeInt(int val) throws IOException
writeInt
in interface DataOutput
IOException
public void writeLong(long val) throws IOException
writeLong
in interface DataOutput
IOException
public void writeFloat(float val) throws IOException
writeFloat
in interface DataOutput
IOException
public void writeDouble(double val) throws IOException
writeDouble
in interface DataOutput
IOException
public void write(byte[] buf, int start, int length) throws IOException
write
in interface DataOutput
write
in interface nom.tam.util.ArrayDataOutput
IOException
public void write(boolean[] buf, int start, int length) throws IOException
write
in interface nom.tam.util.ArrayDataOutput
IOException
public void write(short[] buf, int start, int length) throws IOException
write
in interface nom.tam.util.ArrayDataOutput
IOException
public void write(char[] buf, int start, int length) throws IOException
write
in interface nom.tam.util.ArrayDataOutput
IOException
public void write(int[] buf, int start, int length) throws IOException
write
in interface nom.tam.util.ArrayDataOutput
IOException
public void write(long[] buf, int start, int length) throws IOException
write
in interface nom.tam.util.ArrayDataOutput
IOException
public void write(float[] buf, int start, int length) throws IOException
write
in interface nom.tam.util.ArrayDataOutput
IOException
public void write(double[] buf, int start, int length) throws IOException
write
in interface nom.tam.util.ArrayDataOutput
IOException
public void write(String[] strings, int start, int length) throws IOException
write
in interface nom.tam.util.ArrayDataOutput
IOException
public void writeBytes(String s) throws IOException
writeBytes
in interface DataOutput
IOException
public void writeChars(String s) throws IOException
writeChars
in interface DataOutput
IOException
public void writeUTF(String str) throws IOException
writeUTF
in interface DataOutput
IOException
public void write(byte[] buf) throws IOException
write
in interface DataOutput
write
in interface nom.tam.util.ArrayDataOutput
IOException
public void write(boolean[] buf) throws IOException
write
in interface nom.tam.util.ArrayDataOutput
IOException
public void write(short[] buf) throws IOException
write
in interface nom.tam.util.ArrayDataOutput
IOException
public void write(char[] buf) throws IOException
write
in interface nom.tam.util.ArrayDataOutput
IOException
public void write(int[] buf) throws IOException
write
in interface nom.tam.util.ArrayDataOutput
IOException
public void write(long[] buf) throws IOException
write
in interface nom.tam.util.ArrayDataOutput
IOException
public void write(float[] buf) throws IOException
write
in interface nom.tam.util.ArrayDataOutput
IOException
public void write(double[] buf) throws IOException
write
in interface nom.tam.util.ArrayDataOutput
IOException
public void write(String[] strings) throws IOException
write
in interface nom.tam.util.ArrayDataOutput
IOException
public void writeArray(Object o) throws IOException
writeArray
in interface nom.tam.util.ArrayDataOutput
IOException
|
Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |