public static class PdfWriter.PdfBody
extends java.lang.Object
This class covers the third section of Chapter 5 in the 'Portable Document Format Reference Manual version 1.3' (page 55-60). It contains the body of a PDF document (section 5.14) and it can also generate a Cross-reference Table (section 5.15).
PdfWriter
,
PdfObject
,
PdfIndirectObject
Modifier and Type | Class and Description |
---|---|
static class |
PdfWriter.PdfBody.PdfCrossReference
PdfCrossReference is an entry in the PDF Cross-Reference table. |
Modifier and Type | Field and Description |
---|---|
protected int |
currentObjNum |
protected ByteBuffer |
index |
protected int |
numObj |
protected long |
position
the current byte position in the body.
|
protected int |
refnum |
protected ByteBuffer |
streamObjects |
protected PdfWriter |
writer |
protected java.util.TreeSet<PdfWriter.PdfBody.PdfCrossReference> |
xrefs
array containing the cross-reference table of the normal objects.
|
Modifier | Constructor and Description |
---|---|
protected |
PdfWriter.PdfBody(PdfWriter writer)
Constructs a new
PdfBody . |
Modifier and Type | Method and Description |
---|---|
protected PdfIndirectObject |
add(PdfObject object,
int refNumber,
int generation,
boolean inObjStm) |
protected PdfWriter.PdfBody.PdfCrossReference |
addToObjStm(PdfObject obj,
int nObj) |
void |
flushObjStm() |
protected int |
getIndirectReferenceNumber() |
PdfIndirectReference |
getPdfIndirectReference()
Gets a PdfIndirectReference for an object that will be created in the future.
|
long |
offset()
Returns the offset of the Cross-Reference table.
|
int |
size()
Returns the total number of objects contained in the CrossReferenceTable of this
Body . |
protected void |
write(PdfIndirectObject indirect,
int refNumber) |
protected void |
write(PdfIndirectObject indirect,
int refNumber,
int generation) |
void |
writeCrossReferenceTable(java.io.OutputStream os,
PdfIndirectReference root,
PdfIndirectReference info,
PdfIndirectReference encryption,
PdfObject fileID,
long prevxref)
Returns the CrossReferenceTable of the
Body . |
protected final java.util.TreeSet<PdfWriter.PdfBody.PdfCrossReference> xrefs
protected int refnum
protected long position
protected final PdfWriter writer
protected ByteBuffer index
protected ByteBuffer streamObjects
protected int currentObjNum
protected int numObj
protected PdfWriter.PdfBody(PdfWriter writer)
PdfBody
.writer
- protected PdfWriter.PdfBody.PdfCrossReference addToObjStm(PdfObject obj, int nObj) throws java.io.IOException
java.io.IOException
public void flushObjStm() throws java.io.IOException
java.io.IOException
public PdfIndirectReference getPdfIndirectReference()
protected int getIndirectReferenceNumber()
protected PdfIndirectObject add(PdfObject object, int refNumber, int generation, boolean inObjStm) throws java.io.IOException
java.io.IOException
protected void write(PdfIndirectObject indirect, int refNumber) throws java.io.IOException
java.io.IOException
protected void write(PdfIndirectObject indirect, int refNumber, int generation) throws java.io.IOException
java.io.IOException
public long offset()
public int size()
Body
.public void writeCrossReferenceTable(java.io.OutputStream os, PdfIndirectReference root, PdfIndirectReference info, PdfIndirectReference encryption, PdfObject fileID, long prevxref) throws java.io.IOException
Body
.os
- root
- info
- encryption
- fileID
- prevxref
- java.io.IOException
Copyright © 2013. All Rights Reserved.