public class ByteBuffer
extends java.lang.Object
| Constructor and Description |
|---|
ByteBuffer(java.io.File file) |
ByteBuffer(java.io.InputStream in)
Creates a buffer representing the contents read from an input stream.
|
ByteBuffer(int size) |
ByteBuffer(java.lang.String file) |
| Modifier and Type | Method and Description |
|---|---|
byte |
getByte(int offset) |
byte[] |
getBytes() |
int |
getSize() |
void |
insertByte(int offset,
byte b) |
void |
insertBytes(int offs,
byte[] b) |
int |
read(int offset,
byte[] buf) |
void |
remove(int offset,
int len) |
void |
remove(int offset,
int len,
byte[] removed) |
void |
setByte(int offset,
byte b) |
public ByteBuffer(int size)
public ByteBuffer(java.lang.String file)
throws java.io.IOException
java.io.IOExceptionpublic ByteBuffer(java.io.File file)
throws java.io.IOException
java.io.IOExceptionpublic ByteBuffer(java.io.InputStream in)
throws java.io.IOException
in - The input stream to read from.java.io.IOException - If an IO error occurs.public byte getByte(int offset)
public byte[] getBytes()
public int getSize()
public void insertByte(int offset,
byte b)
public void insertBytes(int offs,
byte[] b)
public int read(int offset,
byte[] buf)
public void remove(int offset,
int len)
public void remove(int offset,
int len,
byte[] removed)
public void setByte(int offset,
byte b)