org.apache.james.mime4j.io
Class LineReaderInputStreamAdaptor

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by org.apache.james.mime4j.io.LineReaderInputStream
              extended by org.apache.james.mime4j.io.LineReaderInputStreamAdaptor
All Implemented Interfaces:
java.io.Closeable

public class LineReaderInputStreamAdaptor
extends LineReaderInputStream

InputStream used by the MIME parser to detect whether the underlying data stream was used (read from) and whether the end of the stream was reached.


Field Summary
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
LineReaderInputStreamAdaptor(java.io.InputStream is)
           
LineReaderInputStreamAdaptor(java.io.InputStream is, int maxLineLen)
           
 
Method Summary
 boolean eof()
           
 boolean isUsed()
           
 int read()
           
 int read(byte[] b, int off, int len)
           
 int readLine(ByteArrayBuffer dst)
          Reads one line of text into the given ByteArrayBuffer.
 java.lang.String toString()
           
 
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LineReaderInputStreamAdaptor

public LineReaderInputStreamAdaptor(java.io.InputStream is,
                                    int maxLineLen)

LineReaderInputStreamAdaptor

public LineReaderInputStreamAdaptor(java.io.InputStream is)
Method Detail

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

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.

eof

public boolean eof()

isUsed

public boolean isUsed()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.