com.imagero.uio.bio
Class VariableSizeByteBuffer
java.lang.Object
com.imagero.uio.bio.VariableSizeByteBuffer
- public class VariableSizeByteBuffer
- extends java.lang.Object
This class can be used to read from and write to byte array.
|
Method Summary |
int |
availableForReading(BufferPosition position)
|
int |
availableForWriting(BufferPosition position)
get amount of bytes which may be written without changing buffer size |
VariableSizeByteBuffer |
create()
|
int |
getCount()
|
java.io.InputStream |
getInputStream(int offset)
|
java.io.OutputStream |
getOutputStream(int offset)
|
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 |
seek(int pos,
BufferPosition position)
|
void |
setCount(int count)
|
long |
skip(long n,
BufferPosition position)
|
void |
write(byte[] b,
int offset,
int length,
BufferPosition position)
|
void |
write(char[] src,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
|
void |
write(double[] src,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
|
void |
write(float[] src,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
|
void |
write(int[] src,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
|
void |
write(int b,
BufferPosition position)
|
void |
write(long[] src,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
|
void |
write(short[] src,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
|
void |
writeBuffer(java.io.DataOutput out)
|
void |
writeBuffer(java.io.OutputStream out)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VariableSizeByteBuffer
public VariableSizeByteBuffer(int size)
VariableSizeByteBuffer
public VariableSizeByteBuffer(byte[] buf)
VariableSizeByteBuffer
public VariableSizeByteBuffer(com.imagero.uio.bio.Buffer buf)
create
public VariableSizeByteBuffer create()
seek
public void seek(int pos,
BufferPosition position)
read
public int read(BufferPosition position)
skip
public long skip(long n,
BufferPosition position)
availableForWriting
public int availableForWriting(BufferPosition position)
- get amount of bytes which may be written without changing buffer size
availableForReading
public int availableForReading(BufferPosition position)
read
public int read(byte[] dest,
int offset,
int length,
BufferPosition position)
read
public int read(short[] dest,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
read
public int read(char[] dest,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
read
public int read(int[] dest,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
read
public int read(float[] dest,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
read
public int read(long[] dest,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
read
public int read(double[] dest,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
getCount
public int getCount()
setCount
public void setCount(int count)
writeBuffer
public void writeBuffer(java.io.OutputStream out)
throws java.io.IOException
- Throws:
java.io.IOException
writeBuffer
public void writeBuffer(java.io.DataOutput out)
throws java.io.IOException
- Throws:
java.io.IOException
write
public void write(byte[] b,
int offset,
int length,
BufferPosition position)
write
public void write(short[] src,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
write
public void write(char[] src,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
write
public void write(int[] src,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
write
public void write(float[] src,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
write
public void write(long[] src,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
write
public void write(double[] src,
int offset,
int length,
boolean bigEndian,
BufferPosition position)
write
public void write(int b,
BufferPosition position)
getInputStream
public java.io.InputStream getInputStream(int offset)
getOutputStream
public java.io.OutputStream getOutputStream(int offset)