|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface PDFContent
Interface used to read PDF content. PDF content is read randomly and on demand, objects are located at arbitrary locations in a PDF file and we need to be able to read objects only when we need them. This interface provides method to read the contents from an arbitrary source (i.e. not a file).
| Method Summary | |
|---|---|
void |
append(byte[] addContent)
Append content to this PDF. |
void |
close()
Close or release any resources that this object holds. |
long |
length()
Get the length of the content. |
int |
read(long position)
Set the current position of the content and read the next byte. |
int |
read(long position,
byte[] buffer,
int offset,
int len)
Read the passed in number of bytes into a byte array. |
void |
setBytes(byte[] content,
long position)
Modifies some of the content in the PDF content. |
void |
writeContents(OutputStream outStream)
Write the contents to an output stream. |
void |
writeContents(OutputStream outStream,
long start,
long length)
Write a section of the content to an output stream. |
| Method Detail |
|---|
int read(long position)
throws IOException
position -
IOException
int read(long position,
byte[] buffer,
int offset,
int len)
throws IOException
position - The location in the content at which to start reading.buffer - The byte array into which to insert the read bytes.offset - The offset in to the byte array at which to insert the read bytes.len - The number of bytes to read.
IOException
long length()
throws IOException
IOException
void writeContents(OutputStream outStream)
throws IOException
outStream -
IOException
void writeContents(OutputStream outStream,
long start,
long length)
throws IOException
outStream - start - length -
IOException
void setBytes(byte[] content,
long position)
throws IOException
content - The new contentposition - The position at which to update the PDF content.
IOException
void append(byte[] addContent)
throws IOException
addContent - The additional content.
IOExceptionvoid close()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||