|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.crionics.jpdf.FileByteReader
public class FileByteReader
This class is used to parse the document from a random access file
| Constructor Summary | |
|---|---|
FileByteReader(java.io.File theFile)
Creates a new FileByteReader object. |
|
FileByteReader(java.io.File theFile,
boolean checkExistance)
Creates a new FileByteReader object. |
|
| Method Summary | |
|---|---|
void |
append(java.util.ArrayList buffer)
Appends the array at the end of the bytereader. |
void |
close()
Closes the document. |
java.io.File |
getFile()
|
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 LEN bytes of data to BUFFER |
void |
seek(int pos)
Sets the cursor position of the specified offset. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileByteReader(java.io.File theFile)
throws java.io.IOException
theFile - the file to work on
java.io.IOException - io issue
public FileByteReader(java.io.File theFile,
boolean checkExistance)
throws java.io.IOException
theFile - the file to read the pdf document fromcheckExistance - true is file existance must be checked
java.io.IOException - io problem| Method Detail |
|---|
public void append(java.util.ArrayList buffer)
throws java.io.IOException
ByteReader
append in interface ByteReaderbuffer - bytes to append.
java.io.IOException - if an IO problem happens.ByteReader.append(ArrayList)
public void close()
throws java.io.IOException
ByteReader
close in interface ByteReaderjava.io.IOException - if an IO problem happens.ByteReader.close()public java.io.File getFile()
public java.lang.String getID()
ByteReader
getID in interface ByteReaderByteReader.getID()
public java.io.InputStream getInputStream()
throws java.io.IOException
ByteReader
getInputStream in interface ByteReaderjava.io.IOException - if an IO problem happens.ByteReader.getInputStream()public int length()
ByteReader
length in interface ByteReaderByteReader.length()
public void open()
throws java.io.IOException
ByteReader
open in interface ByteReaderjava.io.IOException - if an IO problem happens.ByteReader.open()
public int readUnsignedByte()
throws java.io.IOException
ByteReader
readUnsignedByte in interface ByteReaderjava.io.IOException - if an IO problem happensByteReader.readUnsignedByte()
public void readUnsignedBytes(byte[] buffer,
int len)
throws java.io.IOException
readUnsignedBytes in interface ByteReaderbuffer - when to read the bytes tolen - number of bytes to read
java.io.IOException - io issue
public void seek(int pos)
throws java.io.IOException
ByteReader
seek in interface ByteReaderpos - offset in bytes.
java.io.IOException - io problem.ByteReader.seek(int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||