org.pdfbox.pdmodel.common

Class PDNamedTextStream

Implemented Interfaces:
DualCOSObjectable

public class PDNamedTextStream
extends java.lang.Object
implements DualCOSObjectable

A named text stream is a combination of a name and a PDTextStream object. This is used in name trees.
Version:
$Revision: 1.3 $
Author:
Ben Litchfield

Constructor Summary

PDNamedTextStream()
Constructor.
PDNamedTextStream(COSName name, COSBase str)
Constructor.

Method Summary

COSBase
getFirstCOSObject()
Convert this standard java object to a COS object.
String
getName()
The name of the named text stream.
COSBase
getSecondCOSObject()
Convert this standard java object to a COS object.
PDTextStream
getStream()
This will get the stream.
void
setName(String name)
This will set the name of the named text stream.
void
setStream(PDTextStream str)
This will set the stream.

Constructor Details

PDNamedTextStream

public PDNamedTextStream()
Constructor.

PDNamedTextStream

public PDNamedTextStream(COSName name,
                         COSBase str)
Constructor.
Parameters:
name - The name of the stream.
str - The stream.

Method Details

getFirstCOSObject

public COSBase getFirstCOSObject()
Convert this standard java object to a COS object.
Specified by:
getFirstCOSObject in interface DualCOSObjectable
Returns:
The cos object that matches this Java object.

getName

public String getName()
The name of the named text stream.
Returns:
The stream name.

getSecondCOSObject

public COSBase getSecondCOSObject()
Convert this standard java object to a COS object.
Specified by:
getSecondCOSObject in interface DualCOSObjectable
Returns:
The cos object that matches this Java object.

getStream

public PDTextStream getStream()
This will get the stream.
Returns:
The stream associated with this name.

setName

public void setName(String name)
This will set the name of the named text stream.
Parameters:
name - The name of the named text stream.

setStream

public void setStream(PDTextStream str)
This will set the stream.
Parameters:
str - The stream associated with this name.