Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Multivalent API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## multivalent.std.adaptor.pdf
Class InputStreamComposite

    java.lang.Object
      java.io.InputStream
          multivalent.std.adaptor.pdf.InputStreamComposite

public class InputStreamComposite
extends java.io.InputStream

Merges possibly multiple component `InputStream`s, possibly with encodings such as Flate and ASCIIHex, possibly with a Predictor (on LZW or Flate), possibly encrypted. Does not expand out image-specific filters (DCT, FAX, JBIG2). Allows one character of `unread(int)` and `peek()`.

Version:
  $Revision: 1.30 $ $Date: 2005/03/22 04:58:19 $
See Also:
  `DecodeASCIIHex`, `DecodeRunLength`, `InputStreamASCII85`, `InputStreamLZW`, `InflaterInputStream`, `DecodePredictor`

Constructor Summary
`InputStreamComposite(java.lang.Object obj, boolean iscontent, PDFReader pdfr)` Returns stream of buffered, decrypted, uncompressed data; image filters not processed.

Method Summary
`int` | `available()`
`void` | `close()`
`void` | `mark(int readlimit)`
`boolean` | `markSupported()` If no filter, true; else false.
`int` | `peek()` Returns next character without advancing file position pointer, so that next peek() or read() returns same character at same position.
`int` | `read()`
`int` | `read(byte[] b, int off, int len)`
`void` | `reset()`
`long` | `skip(long n)`
`void` | `unread(int c)` Pushes back one character of stream, so that the next read() will return it.

Methods inherited from class java.io.InputStream
`read`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### InputStreamComposite

    public InputStreamComposite(java.lang.Object obj,
                                boolean iscontent,
                                PDFReader pdfr)
                         throws java.io.IOException

  Returns stream of buffered, decrypted, uncompressed data; image filters not processed. Referenced stream dictionary (via IRef, Object[], or direct `Dict`) can supply inline data by setting `COS.STREAM_DATA` key with byte[].

  Parameters:
    `obj` - can be `COS.CLASS_DICTIONARY` for stream with filters, `IRef` to stream or array or streams, Object[] of IRef's to stream, or `COS.CLASS_DATA` for final data requiring no filters.
    `iscontent` - declare whether stream corresponds to page contents, and if so insert extra space between each pair of substreams, to handle corner case where concatenated streams don't have such space and would concatenate commands or arguments.
  Throws:
    `java.io.IOException`

Method Detail

### peek

    public int peek()
             throws java.io.IOException

  Returns next character without advancing file position pointer, so that next peek() or read() returns same character at same position. Side effect: pushback character is set.

  Throws:
    `java.io.IOException`

### unread

    public void unread(int c)

  Pushes back one character of stream, so that the next read() will return it.

### read

    public int read()
             throws java.io.IOException

  Specified by:
    `read` in class `java.io.InputStream`
  Throws:
    `java.io.IOException`

### read

    public int read(byte[] b,
                    int off,
                    int len)
             throws java.io.IOException

  Overrides:
    `read` in class `java.io.InputStream`
  Throws:
    `java.io.IOException`

### markSupported

    public boolean markSupported()

  If no filter, true; else false.

  Overrides:
    `markSupported` in class `java.io.InputStream`

### reset

    public void reset()
               throws java.io.IOException

  Overrides:
    `reset` in class `java.io.InputStream`
  Throws:
    `java.io.IOException`

### mark

    public void mark(int readlimit)

  Overrides:
    `mark` in class `java.io.InputStream`

### close

    public void close()
               throws java.io.IOException

  Overrides:
    `close` in class `java.io.InputStream`
  Throws:
    `java.io.IOException`

### available

    public int available()
                  throws java.io.IOException

  Overrides:
    `available` in class `java.io.InputStream`
  Throws:
    `java.io.IOException`

### skip

    public long skip(long n)
              throws java.io.IOException

  Overrides:
    `skip` in class `java.io.InputStream`
  Throws:
    `java.io.IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Multivalent API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD