Package nom.tam.util
Interface RandomAccess
- All Superinterfaces:
ArrayDataInput
,AutoCloseable
,Closeable
,DataInput
,FitsIO
,InputReader
,OutputWriter
,ReadWriteAccess
- All Known Implementing Classes:
BufferedFile
,FitsFile
Interface that combines file-based random acesss with high-throughput array IO
-
Field Summary
Fields inherited from interface nom.tam.util.FitsIO
BITS_OF_1_BYTE, BITS_OF_2_BYTES, BITS_OF_3_BYTES, BITS_OF_4_BYTES, BITS_OF_5_BYTES, BITS_OF_6_BYTES, BITS_OF_7_BYTES, BYTE_1_OF_LONG_MASK, BYTE_2_OF_LONG_MASK, BYTE_3_OF_LONG_MASK, BYTE_4_OF_LONG_MASK, BYTE_MASK, BYTES_IN_BOOLEAN, BYTES_IN_BYTE, BYTES_IN_CHAR, BYTES_IN_DOUBLE, BYTES_IN_FLOAT, BYTES_IN_INTEGER, BYTES_IN_LONG, BYTES_IN_SHORT, DEFAULT_BUFFER_SIZE, HIGH_INTEGER_MASK, INTEGER_MASK, SHORT_MASK, SHORT_OF_LONG_MASK
-
Method Summary
Methods inherited from interface nom.tam.util.ArrayDataInput
mark, markSupported, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, readArray, readArrayFully, readFully, readImage, readLArray, reset, skip, skipAllBytes, skipAllBytes
Methods inherited from interface java.io.DataInput
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes
Methods inherited from interface nom.tam.util.InputReader
read, read
Methods inherited from interface nom.tam.util.OutputWriter
write, write
Methods inherited from interface nom.tam.util.ReadWriteAccess
length
-
Method Details
-
getFilePointer
long getFilePointer()- Returns:
- the current position in the stream.
-
seek
Move to a specified location in the stream.- Parameters:
offsetFromStart
- set the offset messured from the start- Throws:
IOException
- if the operation fails
-
position
Description copied from interface:ReadWriteAccess
Returns the current read/write position in this instance. The position may exceed the length, depending on implementation, just asseek
may go beyond the file size inRandomAccessFile
.- Specified by:
position
in interfaceReadWriteAccess
- Returns:
- the current read/write position.
- Throws:
IOException
- if there was an IO error.- See Also:
-
position
Description copied from interface:ReadWriteAccess
Sets a new position for the next read or write in this instance. The position may exceed the length, depending on implementation, just asseek
may go beyond the file size inRandomAccessFile
.- Specified by:
position
in interfaceReadWriteAccess
- Parameters:
pos
- the new read/write position.- Throws:
IOException
- if there was an IO error.- See Also:
-