|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.etymon.pjx.PdfObject
com.etymon.pjx.PdfStream
public class PdfStream
Represents the PDF stream object. This class is synchronized.
Field Summary | |
---|---|
protected java.nio.ByteBuffer |
_bb
The byte sequence contained by the stream. |
protected PdfDictionary |
_d
The stream dictionary. |
protected static PdfName |
PDFNAME_LENGTH
A PdfName object representing the name
Length . |
Constructor Summary | |
---|---|
protected |
PdfStream()
A protected constructor intended to be called only from wrap(PdfDictionary,
ByteByffer) . |
|
PdfStream(PdfDictionary d,
java.nio.ByteBuffer bb)
Constructs a stream object from a PDF dictionary and a ByteBuffer . |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Compares this instance with another PDF object for equality. |
java.nio.ByteBuffer |
getBuffer()
Returns the byte sequence contained in this stream. |
PdfDictionary |
getDictionary()
Returns this stream's dictionary. |
int |
hashCode()
Returns a hash code for this object. |
protected static PdfStream |
wrap(PdfDictionary d,
java.nio.ByteBuffer bb)
A factory for fast construction of this class. |
protected int |
writePdf(PdfWriter w,
boolean spacing)
Writes this object in PDF format. |
Methods inherited from class com.etymon.pjx.PdfObject |
---|
clone, filter, filterContents, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.nio.ByteBuffer _bb
protected PdfDictionary _d
protected static final PdfName PDFNAME_LENGTH
PdfName
object representing the name
Length
.
Constructor Detail |
---|
protected PdfStream()
wrap(PdfDictionary,
ByteByffer)
.
public PdfStream(PdfDictionary d, java.nio.ByteBuffer bb)
ByteBuffer
. The stream's byte sequence is
read from the ByteBuffer
starting at its
current position and ending at its limit.
d
- the PDF dictionary.bb
- the ByteBuffer
.Method Detail |
---|
public java.nio.ByteBuffer getBuffer()
ByteBuffer
object is read-only.public PdfDictionary getDictionary()
protected static PdfStream wrap(PdfDictionary d, java.nio.ByteBuffer bb)
PdfDictionary
and ByteBuffer
.
The entire capacity of ByteBuffer
is assumed
to represent the stream's byte sequence. The Length value
in the stream dictionary is assumed to be correct. The
calling method must ensure that the ByteBuffer
is never externally modified or accessed, in order to meet
the immutability requirement of PdfObject
.
m
- the PdfDictionary
and
ByteBuffer
to be used to back this stream.
protected int writePdf(PdfWriter w, boolean spacing) throws java.io.IOException
PdfObject
writePdf
in class PdfObject
w
- the PdfWriter
to write to.spacing
- specifies whether to add white-space before
the object. A value of true
enables the
addition of white-space. If the object begins with a PDF
delimiter, then this option is ignored and no white-space
is written.
java.io.IOException
public boolean equals(java.lang.Object obj)
PdfObject
equals
in class PdfObject
obj
- the object to compare this instance with.
true
if the PDF objects are equal.public int hashCode()
PdfObject
hashCode
in class PdfObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |