|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.simantics.databoard.util.binary.BinaryMemory
public class BinaryMemory
Rancom access memory blob
Constructor Summary | |
---|---|
BinaryMemory()
New memory blob |
|
BinaryMemory(byte[] data)
New memory blob |
|
BinaryMemory(java.nio.ByteBuffer buf)
Assume an existing byte buffer |
|
BinaryMemory(int initialSize)
New memory blob |
|
BinaryMemory(int initialSize,
int increment)
New memory blob |
Method Summary | |
---|---|
void |
close()
Flush and close the blob. |
void |
flush()
Flush write buffer |
void |
insertBytes(long bytes)
Insert bytes at current pointer. |
long |
length()
Get the length of the binary object. |
long |
position()
Get the position of the cursor |
void |
position(long newPosition)
Set new cursor position. |
void |
put(java.io.InputStream is)
|
boolean |
readBoolean()
|
byte |
readByte()
|
char |
readChar()
|
double |
readDouble()
|
float |
readFloat()
|
void |
readFully(byte[] dst)
|
void |
readFully(byte[] dst,
int offset,
int length)
|
void |
readFully(java.nio.ByteBuffer buf)
Read buf fully |
void |
readFully(java.nio.ByteBuffer buf,
int length)
Read fully length bytes |
int |
readInt()
|
java.lang.String |
readLine()
|
long |
readLong()
|
short |
readShort()
|
int |
readUnsignedByte()
|
int |
readUnsignedShort()
|
java.lang.String |
readUTF()
|
void |
removeBytes(long bytes)
Remove bytes from the position of the current pointer. |
void |
setLength(long newLength)
Set length of the binary object. |
int |
skipBytes(int bytes)
|
long |
skipBytes(long bytes)
|
java.nio.ByteBuffer |
toByteBuffer()
Get the backend byte buffer. |
java.lang.String |
toString()
|
void |
write(byte[] src)
|
void |
write(byte[] src,
int offset,
int length)
|
void |
write(int b)
|
void |
writeBoolean(boolean v)
|
void |
writeByte(int b)
|
void |
writeBytes(java.lang.String s)
|
void |
writeChar(int value)
|
void |
writeChars(java.lang.String s)
|
void |
writeDouble(double value)
|
void |
writeFloat(float value)
|
void |
writeFully(java.nio.ByteBuffer src)
Put n bytes from the remaining of the byte array. |
void |
writeFully(java.nio.ByteBuffer src,
int length)
Put n bytes from the remaining of the byte buffer. |
void |
writeInt(int value)
|
void |
writeLong(long value)
|
void |
writeShort(int value)
|
void |
writeUTF(java.lang.String s)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BinaryMemory()
public BinaryMemory(byte[] data)
public BinaryMemory(int initialSize)
public BinaryMemory(int initialSize, int increment)
public BinaryMemory(java.nio.ByteBuffer buf)
buf
- bufferMethod Detail |
---|
public java.nio.ByteBuffer toByteBuffer()
public void close() throws java.io.IOException
RandomAccessBinary
close
in interface RandomAccessBinary
java.io.IOException
public void flush() throws java.io.IOException
RandomAccessBinary
flush
in interface BinaryWriteable
flush
in interface RandomAccessBinary
java.io.IOException
public byte readByte()
readByte
in interface java.io.DataInput
public final java.lang.String readLine() throws java.io.IOException
readLine
in interface java.io.DataInput
java.io.IOException
public final java.lang.String readUTF() throws java.io.IOException
readUTF
in interface java.io.DataInput
java.io.IOException
public int readUnsignedByte() throws java.io.IOException
readUnsignedByte
in interface java.io.DataInput
java.io.IOException
public boolean readBoolean() throws java.io.IOException
readBoolean
in interface java.io.DataInput
java.io.IOException
public void readFully(byte[] dst, int offset, int length)
readFully
in interface java.io.DataInput
public void readFully(byte[] dst)
readFully
in interface java.io.DataInput
public void readFully(java.nio.ByteBuffer buf)
BinaryReadable
readFully
in interface BinaryReadable
public void readFully(java.nio.ByteBuffer buf, int length)
BinaryReadable
readFully
in interface BinaryReadable
public double readDouble()
readDouble
in interface java.io.DataInput
public float readFloat()
readFloat
in interface java.io.DataInput
public int readInt()
readInt
in interface java.io.DataInput
public long readLong()
readLong
in interface java.io.DataInput
public short readShort()
readShort
in interface java.io.DataInput
public char readChar()
readChar
in interface java.io.DataInput
public int readUnsignedShort()
readUnsignedShort
in interface java.io.DataInput
public long length()
RandomAccessBinary
length
in interface BinaryReadable
length
in interface RandomAccessBinary
public long position()
RandomAccessBinary
position
in interface BinaryReadable
position
in interface RandomAccessBinary
public void position(long newPosition) throws java.io.IOException
RandomAccessBinary
position
in interface RandomAccessBinary
java.io.IOException
public void write(int b) throws java.io.IOException
write
in interface java.io.DataOutput
java.io.IOException
public void writeByte(int b) throws java.io.IOException
writeByte
in interface java.io.DataOutput
java.io.IOException
public void writeBoolean(boolean v) throws java.io.IOException
writeBoolean
in interface java.io.DataOutput
java.io.IOException
public void writeFully(java.nio.ByteBuffer src) throws java.io.IOException
BinaryWriteable
writeFully
in interface BinaryWriteable
java.io.IOException
public void writeFully(java.nio.ByteBuffer src, int length) throws java.io.IOException
BinaryWriteable
writeFully
in interface BinaryWriteable
java.io.IOException
public void put(java.io.InputStream is) throws java.io.IOException
java.io.IOException
public void write(byte[] src, int offset, int length) throws java.io.IOException
write
in interface java.io.DataOutput
java.io.IOException
public void write(byte[] src) throws java.io.IOException
write
in interface java.io.DataOutput
java.io.IOException
public void writeDouble(double value) throws java.io.IOException
writeDouble
in interface java.io.DataOutput
java.io.IOException
public void writeFloat(float value) throws java.io.IOException
writeFloat
in interface java.io.DataOutput
java.io.IOException
public void writeInt(int value) throws java.io.IOException
writeInt
in interface java.io.DataOutput
java.io.IOException
public void writeLong(long value) throws java.io.IOException
writeLong
in interface java.io.DataOutput
java.io.IOException
public void writeShort(int value) throws java.io.IOException
writeShort
in interface java.io.DataOutput
java.io.IOException
public void writeChar(int value) throws java.io.IOException
writeChar
in interface java.io.DataOutput
java.io.IOException
public void writeBytes(java.lang.String s) throws java.io.IOException
writeBytes
in interface java.io.DataOutput
java.io.IOException
public void writeChars(java.lang.String s) throws java.io.IOException
writeChars
in interface java.io.DataOutput
java.io.IOException
public void writeUTF(java.lang.String s) throws java.io.IOException
writeUTF
in interface java.io.DataOutput
java.io.IOException
public void insertBytes(long bytes) throws java.io.IOException
RandomAccessBinary
insertBytes
in interface RandomAccessBinary
java.io.IOException
public void removeBytes(long bytes) throws java.io.IOException
RandomAccessBinary
removeBytes
in interface RandomAccessBinary
java.io.IOException
public void setLength(long newLength) throws java.io.IOException
RandomAccessBinary
setLength
in interface RandomAccessBinary
java.io.IOException
public long skipBytes(long bytes) throws java.io.IOException
skipBytes
in interface BinaryReadable
java.io.IOException
public int skipBytes(int bytes) throws java.io.IOException
skipBytes
in interface java.io.DataInput
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |