MergedStream (Jackson-core 2.0.2 API)
Date: 2012-05-14

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

## com.fasterxml.jackson.core.io
Class MergedStream

    java.lang.Object
      java.io.InputStream
          com.fasterxml.jackson.core.io.MergedStream

All Implemented Interfaces:
  Closeable

    public final class MergedStream

extends InputStream

Simple `InputStream` implementation that is used to "unwind" some data previously read from an input stream; so that as long as some of that data remains, it's returned; but as long as it's read, we'll just use data from the underlying original stream. This is similar to `PushbackInputStream`, but here there's only one implicit pushback, when instance is constructed.

Field Summary
`protected IOContext` | `_context`

Constructor Summary
`MergedStream(IOContext context, InputStream in, byte[] buf, int start, int end)`

Method Summary
`int` | `available()`
`void` | `close()`
`void` | `mark(int readlimit)`
`boolean` | `markSupported()`
`int` | `read()`
`int` | `read(byte[] b)`
`int` | `read(byte[] b, int off, int len)`
`void` | `reset()`
`long` | `skip(long n)`

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

Field Detail

### _context

    protected final IOContext _context

Constructor Detail

### MergedStream

    public MergedStream(IOContext context,
                        InputStream in,
                        byte[] buf,
                        int start,
                        int end)

Method Detail

### available

    public int available()
                  throws IOException

  Overrides:
    `available` in class `InputStream`
  Throws:
    `IOException`

### close

    public void close()
               throws IOException

  Specified by:
    `close` in interface `Closeable`
  Overrides:
    `close` in class `InputStream`
  Throws:
    `IOException`

### mark

    public void mark(int readlimit)

  Overrides:
    `mark` in class `InputStream`

### markSupported

    public boolean markSupported()

  Overrides:
    `markSupported` in class `InputStream`

### read

    public int read()
             throws IOException

  Specified by:
    `read` in class `InputStream`
  Throws:
    `IOException`

### read

    public int read(byte[] b)
             throws IOException

  Overrides:
    `read` in class `InputStream`
  Throws:
    `IOException`

### read

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

  Overrides:
    `read` in class `InputStream`
  Throws:
    `IOException`

### reset

    public void reset()
               throws IOException

  Overrides:
    `reset` in class `InputStream`
  Throws:
    `IOException`

### skip

    public long skip(long n)
              throws IOException

  Overrides:
    `skip` in class `InputStream`
  Throws:
    `IOException`

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

Copyright © 2012 fasterxml.com. All Rights Reserved.