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

## net.i2p.util
Class LookaheadInputStream

    java.lang.Object
      java.io.InputStream
          java.io.FilterInputStream
              net.i2p.util.LookaheadInputStream

All Implemented Interfaces:
  Closeable

    public class LookaheadInputStream

extends FilterInputStream

Simple lookahead buffer to keep the last K bytes in reserve, configured to easily be reused. Currently only used by the ResettableGZIPInputStream

Field Summary

Fields inherited from class java.io.FilterInputStream
`in`

Constructor Summary
`LookaheadInputStream(int lookaheadSize)`

Method Summary
`boolean` | `getEOFReached()`
`byte[]` | `getFooter()` grab the lookahead footer
`void` | `initialize(InputStream src)`
`static void` | `main(String[] args)`
`int` | `read()`
`int` | `read(byte[] buf)`
`int` | `read(byte[] buf, int off, int len)`

Methods inherited from class java.io.FilterInputStream
`available, close, mark, markSupported, reset, skip`

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

Constructor Detail

### LookaheadInputStream

    public LookaheadInputStream(int lookaheadSize)

Method Detail

### getEOFReached

    public boolean getEOFReached()

### initialize

    public void initialize(InputStream src)
                    throws IOException

  Throws:
    `IOException`

### read

    public int read()
             throws IOException

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

### read

    public int read(byte[] buf)
             throws IOException

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

### read

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

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

### getFooter

    public byte[] getFooter()

  grab the lookahead footer

### main

    public static void main(String[] args)

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