|
Gnostice PDFOne
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gnostice.pdfone.PdfReader
This class is used in conjunction with the
PdfDocument
class to read from a file and possibly
make changes and save it all to another file. For this purpose,
a PdfReader
object needs two components - an input
stream and an output stream. For this reason,
PdfReader
does not have a default constructor.
Instead, a PdfReader
object is created by explicitly
specifying its input stream and/or its output stream. The class
has several methods to achieve this. Once a PdfReader
object has been created, it is used to in creating a
PdfDocument
that can be set to read from an existing
file or stream.
PdfDocument
Field Summary |
Method Summary | |
PdfObject |
dereferObjectFDF(int objNo)
|
void |
dispose()
Closes all input/output (I/O) streams associated with this PdfReader . |
static PdfReader |
fileReader(File inFile)
Returns a new PdfReader object created with
specified File object as its input stream. |
static PdfReader |
fileReader(File inFile,
OutputStream os)
Returns a new PdfReader object created with
specified File object as its input stream and
specified OutputStream object as its output
stream. |
static PdfReader |
fileReader(File inFile,
String outFilePath)
Returns a new PdfReader object created with
specified File object as its input stream and
file specified by pathname outFilePath as its
output stream. |
static PdfReader |
fileReader(String inFilePath)
Returns a new PdfReader object created with file
specified by pathname inFilePath as its input
stream. |
static PdfReader |
fileReader(String inFilePath,
OutputStream os)
Returns a new PdfReader object created with file
specified by pathname inFilePath as its input
stream and specified OutputStream object as
its output stream. |
static PdfReader |
fileReader(String inFilePath,
String outFilePath)
Returns a new PdfReader object created with file
specified by pathname inFilePath as its input
stream and file specified by pathname outFilePath
as its output stream. |
static PdfReader |
fileReaderFDF(File file)
|
static PdfReader |
fileStreamReader(FileInputStream fis)
Returns a new PdfReader object created with the
specified FileInputStream object as its input
stream. |
static PdfReader |
fileStreamReader(FileInputStream fis,
OutputStream os)
Returns a new PdfReader object created with
specified FileInputStream object as its input stream
and specified OutputStream object as its
output stream. |
static PdfReader |
fileStreamReader(FileInputStream fis,
String outFilePath)
Returns a new PdfReader object created with
specified FileInputStream object as its input stream
and file specified by pathname outFilePath as
its output stream. |
String |
getOutFilePath()
Retrieves pathname of the file currently set as output stream for this PdfReader . |
OutputStream |
getOutputStream()
Retrieves OutputStream object currently set as
output stream for this PdfReader . |
PdfDict |
parseTrailerFdf(long offSet)
|
void |
setOnPageReadHandler(PdfPageReadHandler onPageReadHandler)
|
void |
setOnPasswordHandler(PdfPasswordHandler onPasswordHandler)
|
void |
setOutFilePath(String outFilePath)
Sets file specified by pathname outFilePath as
output stream for this PdfReader . |
void |
setOutputStream(OutputStream os)
Sets specified OutputStream object as output
stream for this PdfReader . |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public void dispose() throws IOException
PdfReader
.
IOException
- An input/output error has occurred.public static PdfReader fileReader(String inFilePath) throws IOException
PdfReader
object created with file
specified by pathname inFilePath
as its input
stream.
inFilePath
- pathname of the file that needs to be used as the
input stream
PdfReader
object
IOException
- if an I/O error occurs.public static PdfReader fileReader(File inFile) throws IOException, PdfException
PdfReader
object created with
specified File
object as its input stream.
inFile
- File
object of the input stream
PdfReader
object
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public static PdfReader fileStreamReader(FileInputStream fis) throws IOException, PdfException
PdfReader
object created with the
specified FileInputStream
object as its input
stream.
fis
- FileInputStream
object of the input
stream
PdfReader
object
IOException
- if an input/output exception has occurred.
PdfException
- if an illegal argument is supplied.public static PdfReader fileReader(String inFilePath, String outFilePath) throws IOException
PdfReader
object created with file
specified by pathname inFilePath
as its input
stream and file specified by pathname outFilePath
as its output stream.
inFilePath
- pathname of the file that needs to be used as the
input streamoutFilePath
- pathname of the file that needs to be used as the
output stream
PdfReader
object
IOException
- if an I/O error occurs.public static PdfReader fileReader(File inFile, String outFilePath) throws IOException, PdfException
PdfReader
object created with
specified File
object as its input stream and
file specified by pathname outFilePath
as its
output stream.
inFile
- File
object of the input streamoutFilePath
- pathname of the file that needs to be used as the
output stream
PdfReader
object
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public static PdfReader fileStreamReader(FileInputStream fis, String outFilePath) throws IOException, PdfException
PdfReader
object created with
specified FileInputStream
object as its input stream
and file specified by pathname outFilePath
as
its output stream.
fis
- FileInputStream
object of the input
streamoutFilePath
- pathname of the file that needs to be used as the
output stream
PdfReader
object
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public static PdfReader fileReader(String inFilePath, OutputStream os) throws IOException
PdfReader
object created with file
specified by pathname inFilePath
as its input
stream and specified OutputStream
object as
its output stream.
inFilePath
- pathname of the file that needs to be used as the
input streamos
- OutputStream
object of the output
stream
PdfReader
object
IOException
- if an I/O error occurs.public static PdfReader fileReader(File inFile, OutputStream os) throws IOException, PdfException
PdfReader
object created with
specified File
object as its input stream and
specified OutputStream
object as its output
stream.
inFile
- File
object of the input streamos
- OutputStream
object of the output
stream
PdfReader
object
IOException
- if an input/output exception had occurred.
PdfException
- if an illegal argument is supplied.public static PdfReader fileStreamReader(FileInputStream fis, OutputStream os) throws IOException, PdfException
PdfReader
object created with
specified FileInputStream
object as its input stream
and specified OutputStream
object as its
output stream.
fis
- FileInputStream
object of the input
streamos
- OutputStream
object of the output
stream
PdfReader
object
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public OutputStream getOutputStream()
OutputStream
object currently set as
output stream for this PdfReader
.
OutputStream
object currently set as
the output streampublic void setOutputStream(OutputStream os)
OutputStream
object as output
stream for this PdfReader
.
os
- OutputStream
object that needs to
be set as the output streampublic String getOutFilePath()
PdfReader
.
public void setOutFilePath(String outFilePath)
outFilePath
as
output stream for this PdfReader
.
outFilePath
- pathname of the file that needs to be set as the
output streampublic void setOnPasswordHandler(PdfPasswordHandler onPasswordHandler)
public void setOnPageReadHandler(PdfPageReadHandler onPageReadHandler)
public PdfObject dereferObjectFDF(int objNo) throws PdfException, IOException
PdfException
IOException
public static PdfReader fileReaderFDF(File file) throws IOException
IOException
public PdfDict parseTrailerFdf(long offSet) throws IOException, PdfException
IOException
PdfException
|
Pro. Ed. v1.41 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |