Top Fields Constructors Methods
org.apache.pdfbox.debugger.streampane

public Class Stream

extends Object
Class Inheritance
Imports
java.awt.image.BufferedImage, java.io.IOException, .InputStream, java.util.ArrayList, .LinkedHashMap, .List, .Map, org.apache.commons.logging.Log, .LogFactory, org.apache.pdfbox.cos.COSArray, .COSBase, .COSDictionary, .COSName, .COSStream, org.apache.pdfbox.pdmodel.PDResources, org.apache.pdfbox.pdmodel.common.PDStream, org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject

Author
Khyrul Bashar A class that provides the COSStream in various views and related information.

Field Summary

Modifier and TypeField and Description
public static final String
private final Map<String, List<String>>
public static final String
private final boolean
private final boolean
private final boolean
private static final Log
private final COSStream

Constructor Summary

AccessConstructor and Description
pack-priv
Stream(COSStream
COSStream instance.
cosStream
,
boolean
boolean instance says if the stream is thumbnail image.
isThumb
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
private Map<String, List<String>>
private String
getFilteredLabel()

Returns the label for the "Unfiltered" menu item.

public List<String>

Returns:

An array of String.
getFilterList
()

Return the available filter list.

public BufferedImage

Returns:

A BufferedImage.
getImage
(PDResources
PDResources for the XObject.
resources
)

Provide the image for stream.

private String
getPartialStreamCommand(final int indexOfStopFilter)

private List<String>
getStopFilterList(final int stopFilterIndex)

public InputStream

Returns:

an InputStream.
getStream
(String
is an instance of String which tells which version of stream should be returned.
key
)

Returns a InputStream of a partially filtered stream.

public boolean

Returns:

true if this an image and false otherwise.
isImage
()

Return if this is stream is an Image XObject.

private boolean
isImageStream(COSDictionary dic, boolean isThumb)

public boolean

Returns:

true if this a metadata stream and false otherwise.
isXmlMetadata
()

Return if this is stream is an Metadata stream.

private boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DECODEDback to summary
public static final String DECODED
filtersback to summary
private final Map<String, List<String>> filters
IMAGEback to summary
public static final String IMAGE
isImageback to summary
private final boolean isImage
isThumbback to summary
private final boolean isThumb
isXmlMetadataback to summary
private final boolean isXmlMetadata
LOGback to summary
private static final Log LOG
strmback to summary
private final COSStream strm

Constructor Detail

Streamback to summary
pack-priv Stream(COSStream cosStream, boolean isThumb)

Constructor.

Parameters
cosStream:COSStream

COSStream instance.

isThumb:boolean

boolean instance says if the stream is thumbnail image.

Method Detail

createFilterListback to summary
private Map<String, List<String>> createFilterList(COSStream stream)
getFilteredLabelback to summary
private String getFilteredLabel()

Returns the label for the "Unfiltered" menu item.

getFilterListback to summary
public List<String> getFilterList()

Return the available filter list. Only "Unfiltered" is returned if there is no filter and in case of XObject image type stream "Image" is also included in the list.

Returns:List<String>

An array of String.

getImageback to summary
public BufferedImage getImage(PDResources resources)

Provide the image for stream. The stream must be image XObject.

Parameters
resources:PDResources

PDResources for the XObject.

Returns:BufferedImage

A BufferedImage.

getPartialStreamCommandback to summary
private String getPartialStreamCommand(final int indexOfStopFilter)
getStopFilterListback to summary
private List<String> getStopFilterList(final int stopFilterIndex)
getStreamback to summary
public InputStream getStream(String key)

Returns a InputStream of a partially filtered stream.

Parameters
key:String

is an instance of String which tells which version of stream should be returned.

Returns:InputStream

an InputStream.

isImageback to summary
public boolean isImage()

Return if this is stream is an Image XObject.

Returns:boolean

true if this an image and false otherwise.

isImageStreamback to summary
private boolean isImageStream(COSDictionary dic, boolean isThumb)
isXmlMetadataback to summary
public boolean isXmlMetadata()

Return if this is stream is an Metadata stream.

Returns:boolean

true if this a metadata stream and false otherwise.

isXmlMetadataStreamback to summary
private boolean isXmlMetadataStream(COSDictionary dic)