|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.InputStream
org.apache.james.util.CharTerminatedInputStream
public class CharTerminatedInputStream
An InputStream class that terminates the stream when it encounters a particular byte sequence.
| Constructor Summary | |
|---|---|
CharTerminatedInputStream(java.io.InputStream in,
char[] terminator)
A constructor for this object that takes a stream to be wrapped and a terminating character sequence. |
|
| Method Summary | |
|---|---|
int |
read()
Read a byte off this stream. |
| Methods inherited from class java.io.InputStream |
|---|
available, close, mark, markSupported, read, read, reset, skip |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CharTerminatedInputStream(java.io.InputStream in,
char[] terminator)
in - the InputStream to be wrappedterminator - the array of characters that will terminate the stream.
java.lang.IllegalArgumentException - if the terminator array is null or empty| Method Detail |
|---|
public int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOException - if an IOException is encountered while reading off the stream
ProtocolException - if the underlying stream returns -1 before the terminator is seen.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||