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

## org.apache.james.mime4j.io
Class BufferedLineReaderInputStream

    java.lang.Object
      java.io.InputStream
          java.io.FilterInputStream
              org.apache.james.mime4j.io.LineReaderInputStream
                  org.apache.james.mime4j.io.BufferedLineReaderInputStream

All Implemented Interfaces:
  java.io.Closeable

    public class BufferedLineReaderInputStream

extends LineReaderInputStream

Input buffer that can be used to search for patterns using Quick Search algorithm in data read from an `InputStream`.

Field Summary

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

Constructor Summary
`BufferedLineReaderInputStream(java.io.InputStream instream, int buffersize)`
`BufferedLineReaderInputStream(java.io.InputStream instream, int buffersize, int maxLineLen)`

Method Summary
`byte[]` | `buf()`
`int` | `capacity()`
`byte` | `charAt(int pos)`
`void` | `clear()`
`void` | `ensureCapacity(int len)`
`int` | `fillBuffer()`
`boolean` | `hasBufferedData()`
`int` | `indexOf(byte b)`
`int` | `indexOf(byte[] pattern)` Implements quick search algorithm as published by
`int` | `indexOf(byte[] pattern, int off, int len)` Implements quick search algorithm as published by
`int` | `indexOf(byte b, int off, int len)`
`int` | `length()`
`int` | `limit()`
`boolean` | `markSupported()`
`int` | `pos()`
`int` | `read()`
`int` | `read(byte[] b)`
`int` | `read(byte[] b, int off, int len)`
`int` | `readLine(ByteArrayBuffer dst)` Reads one line of text into the given `ByteArrayBuffer`.
`int` | `skip(int n)`
`java.lang.String` | `toString()`

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

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

Constructor Detail

### BufferedLineReaderInputStream

    public BufferedLineReaderInputStream(java.io.InputStream instream,
                                         int buffersize,
                                         int maxLineLen)

### BufferedLineReaderInputStream

    public BufferedLineReaderInputStream(java.io.InputStream instream,
                                         int buffersize)

Method Detail

### ensureCapacity

    public void ensureCapacity(int len)

### fillBuffer

    public int fillBuffer()
                   throws java.io.IOException

  Throws:
    `java.io.IOException`

### hasBufferedData

    public boolean hasBufferedData()

### read

    public int read()
             throws java.io.IOException

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

### read

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

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

### read

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

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

### markSupported

    public boolean markSupported()

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

### readLine

    public int readLine(ByteArrayBuffer dst)
                 throws java.io.IOException

  Description copied from class: `LineReaderInputStream`
  Reads one line of text into the given `ByteArrayBuffer`.

  Specified by:
    `readLine` in class `LineReaderInputStream`
  Parameters:
    `dst` - Destination
  Returns:
    number of bytes copied or `-1` if the end of the stream has been reached.
  Throws:
    `java.io.IOException` - in case of an I/O error.

### indexOf

    public int indexOf(byte[] pattern,
                       int off,
                       int len)

  Implements quick search algorithm as published by

  SUNDAY D.M., 1990, A very fast substring search algorithm, Communications of the ACM . 33(8):132-142.

### indexOf

    public int indexOf(byte[] pattern)

  Implements quick search algorithm as published by

  SUNDAY D.M., 1990, A very fast substring search algorithm, Communications of the ACM . 33(8):132-142.

### indexOf

    public int indexOf(byte b,
                       int off,
                       int len)

### indexOf

    public int indexOf(byte b)

### charAt

    public byte charAt(int pos)

### buf

    public byte[] buf()

### pos

    public int pos()

### limit

    public int limit()

### length

    public int length()

### capacity

    public int capacity()

### skip

    public int skip(int n)

### clear

    public void clear()

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

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 © 2004-2008 The Apache Software Foundation. All Rights Reserved.