public class HDF5DataSetRandomAccessFile
extends java.lang.Object
implements ch.systemsx.cisd.base.io.IRandomAccessFile, java.io.Flushable
IRandomAccessFile
backed by an HDF5 dataset. The HDF5 dataset needs to be a byte array
(or opaque byte array) of rank 1.Modifier and Type | Method and Description |
---|---|
int |
available() |
void |
close() |
void |
flush() |
java.nio.ByteOrder |
getByteOrder() |
java.lang.String |
getDataSetPath() |
long |
getFilePointer() |
java.io.File |
getHdf5File() |
boolean |
isReadOnly()
Returns
true if the HDF5 file has been opened in read-only mode. |
long |
length() |
void |
mark(int readlimit) |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
boolean |
readBoolean() |
byte |
readByte() |
char |
readChar() |
double |
readDouble() |
float |
readFloat() |
void |
readFully(byte[] b) |
void |
readFully(byte[] b,
int off,
int len) |
int |
readInt() |
java.lang.String |
readLine() |
long |
readLong() |
short |
readShort() |
int |
readUnsignedByte() |
int |
readUnsignedShort() |
java.lang.String |
readUTF() |
void |
reset() |
void |
seek(long pos) |
void |
setByteOrder(java.nio.ByteOrder byteOrder) |
void |
setLength(long newLength) |
long |
skip(long n) |
int |
skipBytes(int n) |
void |
synchronize() |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
void |
writeBoolean(boolean v) |
void |
writeByte(int v) |
void |
writeBytes(java.lang.String s) |
void |
writeChar(int v) |
void |
writeChars(java.lang.String s) |
void |
writeDouble(double v) |
void |
writeFloat(float v) |
void |
writeInt(int v) |
void |
writeLong(long v) |
void |
writeShort(int v) |
void |
writeUTF(java.lang.String str) |
public java.io.File getHdf5File()
public java.lang.String getDataSetPath()
public boolean isReadOnly()
true
if the HDF5 file has been opened in read-only mode.public long getFilePointer() throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
getFilePointer
in interface ch.systemsx.cisd.base.io.IRandomAccessFile
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public int read() throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
read
in interface ch.systemsx.cisd.base.io.IInputStream
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public int read(byte[] b) throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
read
in interface ch.systemsx.cisd.base.io.IInputStream
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public int read(byte[] b, int off, int len) throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
read
in interface ch.systemsx.cisd.base.io.IInputStream
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public long skip(long n) throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
skip
in interface ch.systemsx.cisd.base.io.IInputStream
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public int available()
available
in interface ch.systemsx.cisd.base.io.IInputStream
public void close() throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
close
in interface ch.systemsx.cisd.base.io.ICloseable
close
in interface ch.systemsx.cisd.base.io.IInputStream
close
in interface ch.systemsx.cisd.base.io.IOutputStream
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public void mark(int readlimit)
mark
in interface ch.systemsx.cisd.base.io.IInputStream
public void reset() throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
reset
in interface ch.systemsx.cisd.base.io.IInputStream
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public boolean markSupported()
markSupported
in interface ch.systemsx.cisd.base.io.IInputStream
public void flush() throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
flush
in interface ch.systemsx.cisd.base.io.IOutputStream
flush
in interface java.io.Flushable
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public void synchronize() throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
synchronize
in interface ch.systemsx.cisd.base.io.IOutputStream
synchronize
in interface ch.systemsx.cisd.base.io.ISynchronizable
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public java.nio.ByteOrder getByteOrder()
getByteOrder
in interface ch.systemsx.cisd.base.io.IRandomAccessFile
public void setByteOrder(java.nio.ByteOrder byteOrder)
setByteOrder
in interface ch.systemsx.cisd.base.io.IRandomAccessFile
public void seek(long pos) throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
seek
in interface ch.systemsx.cisd.base.io.IRandomAccessFile
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public long length() throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
length
in interface ch.systemsx.cisd.base.io.IRandomAccessFile
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public void setLength(long newLength) throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
setLength
in interface ch.systemsx.cisd.base.io.IRandomAccessFile
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public void readFully(byte[] b) throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
readFully
in interface ch.systemsx.cisd.base.io.IRandomAccessFile
readFully
in interface java.io.DataInput
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public void readFully(byte[] b, int off, int len) throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
readFully
in interface ch.systemsx.cisd.base.io.IRandomAccessFile
readFully
in interface java.io.DataInput
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public int skipBytes(int n) throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
skipBytes
in interface ch.systemsx.cisd.base.io.IRandomAccessFile
skipBytes
in interface java.io.DataInput
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public boolean readBoolean() throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
readBoolean
in interface ch.systemsx.cisd.base.io.IRandomAccessFile
readBoolean
in interface java.io.DataInput
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public byte readByte() throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
readByte
in interface ch.systemsx.cisd.base.io.IRandomAccessFile
readByte
in interface java.io.DataInput
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public int readUnsignedByte() throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
readUnsignedByte
in interface ch.systemsx.cisd.base.io.IRandomAccessFile
readUnsignedByte
in interface java.io.DataInput
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public short readShort() throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
readShort
in interface ch.systemsx.cisd.base.io.IRandomAccessFile
readShort
in interface java.io.DataInput
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public int readUnsignedShort() throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
readUnsignedShort
in interface ch.systemsx.cisd.base.io.IRandomAccessFile
readUnsignedShort
in interface java.io.DataInput
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public char readChar() throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
readChar
in interface ch.systemsx.cisd.base.io.IRandomAccessFile
readChar
in interface java.io.DataInput
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public int readInt() throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
readInt
in interface ch.systemsx.cisd.base.io.IRandomAccessFile
readInt
in interface java.io.DataInput
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public long readLong() throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
readLong
in interface ch.systemsx.cisd.base.io.IRandomAccessFile
readLong
in interface java.io.DataInput
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public float readFloat() throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
readFloat
in interface ch.systemsx.cisd.base.io.IRandomAccessFile
readFloat
in interface java.io.DataInput
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public double readDouble() throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
readDouble
in interface ch.systemsx.cisd.base.io.IRandomAccessFile
readDouble
in interface java.io.DataInput
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public java.lang.String readLine() throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
readLine
in interface ch.systemsx.cisd.base.io.IRandomAccessFile
readLine
in interface java.io.DataInput
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public java.lang.String readUTF() throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
readUTF
in interface ch.systemsx.cisd.base.io.IRandomAccessFile
readUTF
in interface java.io.DataInput
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public void write(int b) throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
write
in interface ch.systemsx.cisd.base.io.IOutputStream
write
in interface ch.systemsx.cisd.base.io.IRandomAccessFile
write
in interface java.io.DataOutput
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public void write(byte[] b) throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
write
in interface ch.systemsx.cisd.base.io.IOutputStream
write
in interface ch.systemsx.cisd.base.io.IRandomAccessFile
write
in interface java.io.DataOutput
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public void write(byte[] b, int off, int len) throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
write
in interface ch.systemsx.cisd.base.io.IOutputStream
write
in interface ch.systemsx.cisd.base.io.IRandomAccessFile
write
in interface java.io.DataOutput
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public void writeBoolean(boolean v) throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
writeBoolean
in interface ch.systemsx.cisd.base.io.IRandomAccessFile
writeBoolean
in interface java.io.DataOutput
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public void writeByte(int v) throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
writeByte
in interface ch.systemsx.cisd.base.io.IRandomAccessFile
writeByte
in interface java.io.DataOutput
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public void writeShort(int v) throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
writeShort
in interface ch.systemsx.cisd.base.io.IRandomAccessFile
writeShort
in interface java.io.DataOutput
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public void writeChar(int v) throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
writeChar
in interface ch.systemsx.cisd.base.io.IRandomAccessFile
writeChar
in interface java.io.DataOutput
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public void writeInt(int v) throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
writeInt
in interface ch.systemsx.cisd.base.io.IRandomAccessFile
writeInt
in interface java.io.DataOutput
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public void writeLong(long v) throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
writeLong
in interface ch.systemsx.cisd.base.io.IRandomAccessFile
writeLong
in interface java.io.DataOutput
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public void writeFloat(float v) throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
writeFloat
in interface ch.systemsx.cisd.base.io.IRandomAccessFile
writeFloat
in interface java.io.DataOutput
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public void writeDouble(double v) throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
writeDouble
in interface ch.systemsx.cisd.base.io.IRandomAccessFile
writeDouble
in interface java.io.DataOutput
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public void writeBytes(java.lang.String s) throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
writeBytes
in interface ch.systemsx.cisd.base.io.IRandomAccessFile
writeBytes
in interface java.io.DataOutput
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public void writeChars(java.lang.String s) throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
writeChars
in interface ch.systemsx.cisd.base.io.IRandomAccessFile
writeChars
in interface java.io.DataOutput
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
public void writeUTF(java.lang.String str) throws ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked
writeUTF
in interface ch.systemsx.cisd.base.io.IRandomAccessFile
writeUTF
in interface java.io.DataOutput
ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked