Class CosStream

  • Direct Known Subclasses:
    CosObjectStream

    public class CosStream
    extends CosDictionary
    Represents a COS stream as defined in section 3.2.7 of the PDF Reference Manual version 1.4. The stream data can be represented in encoded or decoded form. In a PDF file the stream data are encoded according to the value of the /Filters entry in the stream dictionary [if one exists]. For those rare occasions when an application processes encoded stream data (mostly when it copies the stream from one external location to another) the CosStream class contains getStreamEncoded(...) and newDataEncoded(...) methods. These methods deliver/accept data in the encoded form. When the data are placed in the CosStream object with newDataEncoded(...) methods, the write() method does not encode the stream data before writing them to the PDF file. The consumers of the CosStream class should not mix CosStream methods that deliver/accept the stream data in the decoded and encoded form for the same CosStream object.