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 isPDFOutputStreamto 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 PDFOutputappend(byte[] theBytes, int anOffset, int aLength)Appends an arbitrary byte array with the given offset and length.PDFOutputappend(char aChar)Adds a character to the pdf buffer.PDFOutputappend(PDFBuffer aBuffer)Appends another buffer.longlength()Returns the current length of the output.byte[]toByteArray()
-
-
-
Method Detail
-
length
public long length()
Description copied from class:PDFOutputReturns the current length of the output.
-
append
public PDFOutput append(char aChar)
Description copied from class:PDFOutputAdds a character to the pdf buffer.
-
append
public PDFOutput append(byte[] theBytes, int anOffset, int aLength)
Description copied from class:PDFOutputAppends an arbitrary byte array with the given offset and length.
-
toByteArray
public byte[] toByteArray()
-
-