|
PDF Clown 0.0.8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IBuffer
Buffer interface.
Its pivotal concept is the array index.
Method Summary | |
---|---|
void |
append(byte data)
Appends a byte to the buffer. |
void |
append(byte[] data)
Appends a byte array to the buffer. |
void |
append(byte[] data,
int offset,
int length)
Appends a byte range to the buffer. |
void |
append(IInputStream data)
Appends an IInputStream to the buffer. |
void |
append(String data)
Appends a string to the buffer. |
IBuffer |
clone()
Gets a clone of the buffer. |
void |
decode(Filter filter)
Applies the specified filter to decode the buffer. |
void |
delete(int index,
int length)
Deletes a byte chunk from the buffer. |
byte[] |
encode(Filter filter)
Applies the specified filter to encode the buffer. |
int |
getByte(int index)
Gets the byte at a specified location. |
byte[] |
getByteArray(int index,
int length)
Gets the byte range beginning at a specified location. |
int |
getCapacity()
Gets the allocated buffer size. |
String |
getString(int index,
int length)
Gets the string beginning at a specified location. |
void |
insert(int index,
byte[] data)
Inserts a byte array into the buffer. |
void |
insert(int index,
byte[] data,
int offset,
int length)
Inserts a byte range into the buffer. |
void |
insert(int index,
IInputStream data)
Inserts an IInputStream into the buffer. |
void |
insert(int index,
String data)
Inserts a string into the buffer. |
void |
replace(int index,
byte[] data)
Replaces the buffer contents with a byte array. |
void |
replace(int index,
byte[] data,
int offset,
int length)
Replaces the buffer contents with a byte range. |
void |
replace(int index,
IInputStream data)
Replaces the buffer contents with an IInputStream. |
void |
replace(int index,
String data)
Replaces the buffer contents with a string. |
void |
setLength(int value)
Sets the used buffer size. |
void |
writeTo(IOutputStream stream)
Writes the buffer data to a stream. |
Methods inherited from interface it.stefanochizzolini.clown.bytes.IInputStream |
---|
getByteOrder, getPosition, hashCode, read, read, readByte, readInt, readLine, readShort, readString, readUnsignedByte, readUnsignedShort, seek, setByteOrder, setPosition, skip, toByteArray |
Methods inherited from interface it.stefanochizzolini.clown.bytes.IOutputStream |
---|
write, write, write, write |
Methods inherited from interface it.stefanochizzolini.clown.bytes.IStream |
---|
getLength |
Methods inherited from interface java.io.Closeable |
---|
close |
Method Detail |
---|
void append(byte data)
data
- Byte to copy.void append(byte[] data)
data
- Byte array to copy.void append(byte[] data, int offset, int length)
data
- Byte array from which the byte range has to be copied.offset
- Location in the byte array at which copying begins.length
- Number of bytes to copy.void append(String data)
data
- String to copy.void append(IInputStream data)
data
- Source data to copy.IBuffer clone()
void decode(Filter filter)
filter
- Filter to use for decoding the buffer.void delete(int index, int length)
index
- Location at which deletion has to begin.length
- Number of bytes to delete.byte[] encode(Filter filter)
filter
- Filter to use for encoding the buffer.
int getByte(int index)
index
- A location in the buffer.
byte[] getByteArray(int index, int length)
index
- Location at which the byte range has to begin.length
- Number of bytes to copy.
String getString(int index, int length)
index
- Location at which the string has to begin.length
- Number of bytes to convert.
int getCapacity()
void insert(int index, byte[] data)
index
- Location at which the byte array has to be inserted.data
- Byte array to insert.void insert(int index, byte[] data, int offset, int length)
index
- Location at which the byte range has to be inserted.data
- Byte array from which the byte range has to be copied.offset
- Location in the byte array at which copying begins.length
- Number of bytes to copy.void insert(int index, String data)
index
- Location at which the string has to be inserted.data
- String to insert.void insert(int index, IInputStream data)
index
- Location at which the IInputStream has to be inserted.data
- Source data to copy.void replace(int index, byte[] data)
index
- Location at which the byte array has to be copied.data
- Byte array to copy.void replace(int index, byte[] data, int offset, int length)
index
- Location at which the byte range has to be copied.data
- Byte array from which the byte range has to be copied.offset
- Location in the byte array at which copying begins.length
- Number of bytes to copy.void replace(int index, String data)
index
- Location at which the string has to be copied.data
- String to copy.void replace(int index, IInputStream data)
index
- Location at which the IInputStream has to be copied.data
- Source data to copy.void setLength(int value)
value
- New length.void writeTo(IOutputStream stream)
stream
- Target stream.
|
PDF Clown 0.0.8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |