java.lang.Object
org.sejda.sambox.pdmodel.graphics.PDXObject
- All Implemented Interfaces:
COSObjectable
- Direct Known Subclasses:
PDFormXObject,PDImageXObject,PDPostScriptXObject
An external object, or "XObject".
- Author:
- Ben Litchfield, John Hewson
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a new XObject from the given stream and subtype.protectedCreates a new XObject from the given stream and subtype.protectedCreates a new XObject from the given stream and subtype. -
Method Summary
Modifier and TypeMethodDescriptionstatic PDXObjectcreateXObject(COSBase base, PDResources resources) Creates a new XObject instance of the appropriate type for the COS stream.final COSStreamReturns the stream.final PDStreamReturns the stream.final void
-
Constructor Details
-
PDXObject
Creates a new XObject from the given stream and subtype.- Parameters:
stream- The stream to read.subtype-
-
PDXObject
Creates a new XObject from the given stream and subtype.- Parameters:
stream- The stream to read.subtype-
-
PDXObject
Creates a new XObject from the given stream and subtype.- Parameters:
stream- The stream to read.
-
-
Method Details
-
createXObject
Creates a new XObject instance of the appropriate type for the COS stream.- Parameters:
base- The stream which is wrapped by this XObject.- Returns:
- A new XObject instance.
- Throws:
IOException- if there is an error creating the XObject.
-
getCOSObject
Returns the stream.- Specified by:
getCOSObjectin interfaceCOSObjectable- Returns:
- The
COSBasethat matches this Java object.
-
getStream
Returns the stream.- Returns:
- The stream for this object.
-
setStream
-