|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.pdfbox.pdmodel.common.PDTextStream
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.
| Constructor Summary | |
PDTextStream(COSStream str)
Constructor. |
|
PDTextStream(COSString str)
Constructor. |
|
PDTextStream(String str)
Constructor. |
|
| Method Summary | |
static PDTextStream |
createTextStream(COSBase base)
This will create the text stream object. |
InputStream |
getAsStream()
This is the preferred way of getting data with this class as it uses a stream object. |
String |
getAsString()
This will get this value as a string. |
COSBase |
getCOSObject()
Convert this standard java object to a COS object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PDTextStream(COSString str)
str - The string parameter.public PDTextStream(String str)
str - The string parameter.public PDTextStream(COSStream str)
str - The stream parameter.| Method Detail |
public static PDTextStream createTextStream(COSBase base)
base - The COS text stream object.
public COSBase getCOSObject()
getCOSObject in interface COSObjectable
public String getAsString()
throws IOException
IOException - If an IO error occurs while accessing the stream.
public InputStream getAsStream()
throws IOException
IOException - If an IO error occurs while accessing the stream.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||