|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
org.apache.james.mime4j.io.LineReaderInputStream
org.apache.james.mime4j.io.BufferedLineReaderInputStream
public class BufferedLineReaderInputStream
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 | |
---|---|
protected byte[] |
buf()
|
int |
byteAt(int pos)
|
int |
capacity()
|
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)
|
protected int |
length()
|
protected int |
limit()
|
boolean |
markSupported()
|
protected int |
pos()
|
int |
read()
|
int |
read(byte[] b)
|
int |
read(byte[] b,
int off,
int len)
|
protected boolean |
readAllowed()
|
int |
readLine(ByteArrayBuffer dst)
Reads one line of text into the given ByteArrayBuffer . |
protected int |
skip(int n)
|
java.lang.String |
toString()
|
void |
truncate()
|
boolean |
unread(ByteArrayBuffer buf)
Tries to unread the last read line. |
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 |
---|
public BufferedLineReaderInputStream(java.io.InputStream instream, int buffersize, int maxLineLen)
public BufferedLineReaderInputStream(java.io.InputStream instream, int buffersize)
Method Detail |
---|
public void ensureCapacity(int len)
public int fillBuffer() throws java.io.IOException
java.io.IOException
public boolean hasBufferedData()
public void truncate()
protected boolean readAllowed()
public int read() throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
public int read(byte[] b) throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
public boolean markSupported()
markSupported
in class java.io.FilterInputStream
public int readLine(ByteArrayBuffer dst) throws MaxLineLimitException, java.io.IOException
LineReaderInputStream
ByteArrayBuffer
.
readLine
in class LineReaderInputStream
dst
- Destination
-1
if the end of
the stream has been reached.
MaxLineLimitException
- if the line exceeds a limit on
the line length imposed by a subclass.
java.io.IOException
- in case of an I/O error.public int indexOf(byte[] pattern, int off, int len)
SUNDAY D.M., 1990, A very fast substring search algorithm, Communications of the ACM . 33(8):132-142.
public int indexOf(byte[] pattern)
SUNDAY D.M., 1990, A very fast substring search algorithm, Communications of the ACM . 33(8):132-142.
public int indexOf(byte b, int off, int len)
public int indexOf(byte b)
public int byteAt(int pos)
protected byte[] buf()
protected int pos()
protected int limit()
protected int length()
public int capacity()
protected int skip(int n)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean unread(ByteArrayBuffer buf)
LineReaderInputStream
unread
in class LineReaderInputStream
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |