Class PDFBuffer
- java.lang.Object
-
- com.inductiveautomation.rm.pdf.writer.PDFOutput
-
- com.inductiveautomation.rm.pdf.writer.PDFBuffer
-
- Direct Known Subclasses:
PDFPage
public class PDFBuffer extends PDFOutput
This class is like a StringBuffer, but for creating PDF files instead of strings. It resides entirely in memory so it should be used sparingly. The preferred PDFOutput implementation isPDFOutputStream
to prevent large PDF assets from being held in memory.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.io.ByteArrayOutputStream
_source
-
Constructor Summary
Constructors Constructor Description PDFBuffer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PDFOutput
append(byte[] theBytes, int anOffset, int aLength)
Appends an arbitrary byte array with the given offset and length.PDFOutput
append(char aChar)
Adds a character to the pdf buffer.PDFOutput
append(PDFBuffer aBuffer)
Appends another buffer.long
length()
Returns the current length of the output.byte[]
toByteArray()
-
-
-
Method Detail
-
length
public long length()
Description copied from class:PDFOutput
Returns the current length of the output.
-
append
public PDFOutput append(char aChar)
Description copied from class:PDFOutput
Adds a character to the pdf buffer.
-
append
public PDFOutput append(byte[] theBytes, int anOffset, int aLength)
Description copied from class:PDFOutput
Appends an arbitrary byte array with the given offset and length.
-
toByteArray
public byte[] toByteArray()
-
-