|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.simantics.databoard.util.binary.FileReadable
public class FileReadable
This class is a Random Access File implementation to Binary Readable. The implementation is buffered. The implementation is not multi-thread safe. Although file pointer of the backend RandomAccessFile is allowed to move between read operations of this class.
Constructor Summary | |
---|---|
FileReadable(java.io.RandomAccessFile file)
|
Method Summary | |
---|---|
void |
clearBuffer()
Flushes internal buffer |
void |
close()
Closes the object. |
byte |
get()
|
void |
get(byte[] dst)
|
void |
get(byte[] dst,
int offset,
int length)
|
void |
get(java.nio.ByteBuffer buf)
Get buf fully |
void |
get(java.nio.ByteBuffer buf,
int length)
Get fully length bytes |
double |
getDouble()
|
java.io.RandomAccessFile |
getFile()
|
float |
getFloat()
|
int |
getInt()
|
long |
getLong()
|
short |
getShort()
|
long |
length()
|
java.nio.ByteOrder |
order()
|
void |
order(java.nio.ByteOrder order)
|
long |
position()
Get position |
void |
position(long newPosition)
Seek new position. |
void |
skip(long bytes)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileReadable(java.io.RandomAccessFile file) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public void close() throws java.io.IOException
java.io.IOException
public java.io.RandomAccessFile getFile()
public java.nio.ByteOrder order()
order
in interface BinaryReadable
public void order(java.nio.ByteOrder order)
order
in interface BinaryReadable
public byte get() throws java.io.IOException
get
in interface BinaryReadable
java.io.IOException
public void get(byte[] dst, int offset, int length) throws java.io.IOException
get
in interface BinaryReadable
java.io.IOException
public void get(byte[] dst) throws java.io.IOException
get
in interface BinaryReadable
java.io.IOException
public void get(java.nio.ByteBuffer buf) throws java.io.IOException
BinaryReadable
get
in interface BinaryReadable
java.io.IOException
public void get(java.nio.ByteBuffer buf, int length) throws java.io.IOException
BinaryReadable
get
in interface BinaryReadable
java.io.IOException
public double getDouble() throws java.io.IOException
getDouble
in interface BinaryReadable
java.io.IOException
public float getFloat() throws java.io.IOException
getFloat
in interface BinaryReadable
java.io.IOException
public int getInt() throws java.io.IOException
getInt
in interface BinaryReadable
java.io.IOException
public long getLong() throws java.io.IOException
getLong
in interface BinaryReadable
java.io.IOException
public short getShort() throws java.io.IOException
getShort
in interface BinaryReadable
java.io.IOException
public long length() throws java.io.IOException
length
in interface BinaryReadable
java.io.IOException
public long position() throws java.io.IOException
Seekable
position
in interface BinaryReadable
position
in interface Seekable
java.io.IOException
public void position(long newPosition) throws java.io.IOException
Seekable
position
in interface Seekable
newPosition
- new position
java.io.IOException
public void clearBuffer()
public void skip(long bytes) throws java.io.IOException
skip
in interface BinaryReadable
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |