|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.imagero.uio.bio.FixedSizeByteBuffer
This class can be used to read from and write to byte array.
| Constructor Summary | |
FixedSizeByteBuffer(byte[] buf)
|
|
| Method Summary | |
int |
availableForReading(BufferPosition position)
|
int |
availableForWriting(BufferPosition position)
|
RandomAccessIO |
create()
|
RandomAccessIO |
create(int offset,
int length)
|
int |
getCount()
|
int |
getPosition(BufferPosition position)
|
int |
read(BufferPosition position)
|
int |
read(byte[] dest,
int offset,
int length,
BufferPosition position)
|
int |
read(char[] dest,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
|
int |
read(double[] dest,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
|
int |
read(float[] dest,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
|
int |
read(int[] dest,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
|
int |
read(long[] dest,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
|
int |
read(short[] dest,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
|
void |
setCount(int count)
|
long |
skip(long n,
BufferPosition position)
|
int |
write(byte[] src,
int offset,
int length,
BufferPosition position)
|
int |
write(char[] src,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
|
int |
write(double[] src,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
|
int |
write(float[] src,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
|
int |
write(int[] src,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
|
void |
write(int b,
BufferPosition position)
write given byte to buffer. |
int |
write(long[] src,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
|
int |
write(short[] src,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
|
void |
writeBuffer(java.io.DataOutput out)
|
void |
writeBuffer(java.io.DataOutput out,
boolean wholeBuffer)
|
void |
writeBuffer(java.io.OutputStream out)
write whole buffer contents to OutputStream (count is ignored) |
void |
writeBuffer(java.io.OutputStream out,
boolean wholeBuffer)
write buffer contents to OutputStream |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public FixedSizeByteBuffer(byte[] buf)
| Method Detail |
public int read(BufferPosition position)
public long skip(long n,
BufferPosition position)
public int availableForReading(BufferPosition position)
public int availableForWriting(BufferPosition position)
public int read(byte[] dest,
int offset,
int length,
BufferPosition position)
public int read(short[] dest,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
public int read(char[] dest,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
public int read(int[] dest,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
public int read(float[] dest,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
public int read(long[] dest,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
public int read(double[] dest,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
public void write(int b,
BufferPosition position)
b - int to writepublic int getCount()
public int getPosition(BufferPosition position)
public void setCount(int count)
public void writeBuffer(java.io.OutputStream out,
boolean wholeBuffer)
throws java.io.IOException
wholeBuffer - if true then whole buffer is written, otherwise only getCount() bytes are written
java.io.IOException
public void writeBuffer(java.io.DataOutput out,
boolean wholeBuffer)
throws java.io.IOException
java.io.IOException
public void writeBuffer(java.io.OutputStream out)
throws java.io.IOException
java.io.IOException
public void writeBuffer(java.io.DataOutput out)
throws java.io.IOException
java.io.IOException
public int write(byte[] src,
int offset,
int length,
BufferPosition position)
public int write(short[] src,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
public int write(char[] src,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
public int write(int[] src,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
public int write(float[] src,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
public int write(long[] src,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
public int write(double[] src,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
public RandomAccessIO create()
public RandomAccessIO create(int offset,
int length)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||