Class PDFStream
- java.lang.Object
-
- com.inductiveautomation.rm.base.RMListenerList
-
- com.inductiveautomation.rm.base.RMObject
-
- com.inductiveautomation.rm.pdf.writer.PDFStream
-
- All Implemented Interfaces:
RMPropertyChanger
,java.lang.Cloneable
public class PDFStream extends RMObject
This class represents a PDF stream object.
-
-
Constructor Summary
Constructors Constructor Description PDFStream(byte[] theBytes, java.util.Map aMap)
Creates a new stream from the byte array and map.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFilter(java.lang.String aName)
The dict for a stream may specify multiple filters.PDFStream
clone()
Standard clone implementation.static byte[]
getBytesEncoded(RMPDFWriter aWriter, byte[] bytes, int offset, int length)
Returns Flate encoded bytes from the given raw bytes.java.util.Map
getDictionary()
Returns the stream dictionary.void
writePDF(RMPDFWriter aWriter)
Writes a stream to a pdf buffer.-
Methods inherited from class com.inductiveautomation.rm.base.RMObject
addPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChange, toString
-
Methods inherited from class com.inductiveautomation.rm.base.RMListenerList
addListener, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
-
-
-
-
Method Detail
-
getDictionary
public java.util.Map getDictionary()
Returns the stream dictionary.
-
addFilter
public void addFilter(java.lang.String aName)
The dict for a stream may specify multiple filters. The "Filter" property is either a single filter name or on array of filter names. If it's an array, the PDF reader will apply the filters in the order they appear. Call this method with the name of the filter after applying the encoding to the data.
-
getBytesEncoded
public static byte[] getBytesEncoded(RMPDFWriter aWriter, byte[] bytes, int offset, int length)
Returns Flate encoded bytes from the given raw bytes.
-
clone
public PDFStream clone()
Standard clone implementation.- Overrides:
clone
in classRMListenerList
-
writePDF
public void writePDF(RMPDFWriter aWriter)
Writes a stream to a pdf buffer.
-
-