| |
|
| java.lang.Object org.pdfbox.pdmodel.common.PDTextStream
PDTextStream | public class PDTextStream implements COSObjectable(Code) | | A PDTextStream class is used when the PDF specification supports either
a string or a stream for the value of an object. This is usually when
a value could be large or small, for example a JavaScript method. This
class will help abstract that and give a single unified interface to
those types of fields.
author: Ben Litchfield version: $Revision: 1.3 $ |
PDTextStream | public PDTextStream(COSString str)(Code) | | Constructor.
Parameters: str - The string parameter. |
PDTextStream | public PDTextStream(String str)(Code) | | Constructor.
Parameters: str - The string parameter. |
PDTextStream | public PDTextStream(COSStream str)(Code) | | Constructor.
Parameters: str - The stream parameter. |
createTextStream | public static PDTextStream createTextStream(COSBase base)(Code) | | This will create the text stream object. base must either be a string
or a stream.
Parameters: base - The COS text stream object. A PDTextStream that wraps the base object. |
getAsStream | public InputStream getAsStream() throws IOException(Code) | | This is the preferred way of getting data with this class as it uses
a stream object.
The stream object. throws: IOException - If an IO error occurs while accessing the stream. |
getAsString | public String getAsString() throws IOException(Code) | | This will get this value as a string. If this is a stream then it
will load the entire stream into memory, so you should only do this when
the stream is a manageable size.
This value as a string. throws: IOException - If an IO error occurs while accessing the stream. |
getCOSObject | public COSBase getCOSObject()(Code) | | Convert this standard java object to a COS object.
The cos object that matches this Java object. |
|
|
|