| java.lang.Object java.io.InputStream org.apache.james.smtpserver.SizeLimitedInputStream
SizeLimitedInputStream | public class SizeLimitedInputStream extends InputStream (Code) | | Wraps an underlying input stream, limiting the allowable size
of incoming data. The size limit is configured in the conf file,
and when the limit is reached, a MessageSizeException is thrown.
|
Method Summary | |
public int | read(byte[] b, int off, int len) Overrides the read method of InputStream to call the read() method of the
wrapped input stream. | public int | read() Overrides the read method of InputStream to call the read() method of the
wrapped input stream.
throws: IOException - Throws a MessageSizeException, which is a sub-type of IOException. |
SizeLimitedInputStream | public SizeLimitedInputStream(InputStream in, long maxmessagesize)(Code) | | Constructor for the stream. Wraps an underlying stream.
Parameters: in - InputStream to use as basis for new Stream. Parameters: maxmessagesize - Message size limit, in Kilobytes |
read | public int read(byte[] b, int off, int len) throws IOException(Code) | | Overrides the read method of InputStream to call the read() method of the
wrapped input stream.
throws: IOException - Throws a MessageSizeException, which is a sub-type of IOException Returns the number of bytes read. |
read | public int read() throws IOException(Code) | | Overrides the read method of InputStream to call the read() method of the
wrapped input stream.
throws: IOException - Throws a MessageSizeException, which is a sub-type of IOException. Returns the int character value of the byte read. |
|
|