Class PDFStream

All Implemented Interfaces:
RMPropertyChanger, Cloneable

public class PDFStream extends RMObject
This class represents a PDF stream object.
  • Constructor Details

    • PDFStream

      public PDFStream(byte[] theBytes, Map aMap)
      Creates a new stream from the byte array and map.
  • Method Details

    • getDictionary

      public Map getDictionary()
      Returns the stream dictionary.
    • addFilter

      public void addFilter(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

      @Nullable 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 class RMListenerList
    • writePDF

      public void writePDF(RMPDFWriter aWriter)
      Writes a stream to a pdf buffer.