|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ByteReader
Interface used as a wrapper for random access streams.
Two implementations are available: File and Memory.
A network implementation would be really easy to do...
| Method Summary | |
|---|---|
void |
append(java.util.ArrayList buffer)
Appends the array at the end of the bytereader. |
void |
close()
Closes the document. |
java.lang.String |
getID()
Returns a human readable description of this byte reader (for instance a path for a file,...). |
java.io.InputStream |
getInputStream()
Returns an InputStream on the document. |
int |
length()
Returns the size of the document in bytes. |
void |
open()
Opens the document. |
int |
readUnsignedByte()
Returns an unsigned byte from the document. |
void |
readUnsignedBytes(byte[] buffer,
int len)
Reads unsigned bytes from document and stores them in a buffer. |
void |
seek(int pos)
Sets the cursor position of the specified offset. |
| Method Detail |
|---|
void append(java.util.ArrayList buffer)
throws java.io.IOException
buffer - bytes to append.
java.io.IOException - if an IO problem happens.
void close()
throws java.io.IOException
java.io.IOException - if an IO problem happens.java.lang.String getID()
java.io.InputStream getInputStream()
throws java.io.IOException
java.io.IOException - if an IO problem happens.int length()
void open()
throws java.io.IOException
java.io.IOException - if an IO problem happens.
int readUnsignedByte()
throws java.io.IOException
java.io.IOException - if an IO problem happens
void readUnsignedBytes(byte[] buffer,
int len)
throws java.io.IOException
buffer - The byte buffer where the data will be stored.len - The number of bytes to read from the document.
java.io.IOException - if an IO problem happens
void seek(int pos)
throws java.io.IOException
pos - offset in bytes.
java.io.IOException - io problem.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||