org.apache.james.smtpserver
Class SMTPInputStream
java.lang.Object
|
+--java.io.InputStream
|
+--java.io.FilterInputStream
|
+--org.apache.james.smtpserver.SMTPInputStream
- public class SMTPInputStream
- extends FilterInputStream
Removes the dot-stuffing happening during the SMTP DATA transport
- Author:
- Serge Knystautas
Field Summary |
protected int[] |
last
An array to hold the last two bytes read off the stream.
|
Method Summary |
int |
read()
Read through the stream, checking for '\r\n.' |
int |
read(byte[] b,
int off,
int len)
Read through the stream, checking for '\r\n.' |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
last
protected int[] last
- An array to hold the last two bytes read off the stream.
This allows the stream to detect '\r\n' sequences even
when they occur across read boundaries.
SMTPInputStream
public SMTPInputStream(InputStream in)
read
public int read()
throws IOException
- Read through the stream, checking for '\r\n.'
- Overrides:
read
in class FilterInputStream
- Returns:
- the byte read from the stream
IOException
read
public int read(byte[] b,
int off,
int len)
throws IOException
- Read through the stream, checking for '\r\n.'
- Overrides:
read
in class FilterInputStream
- Parameters:
b
- the byte array into which the bytes will be readoff
- the offset into the byte array where the bytes will be insertedlen
- the maximum number of bytes to be read off the stream
- Returns:
- the number of bytes read
IOException
"Copyright © 1999-2002 Apache Jakarta Project. All Rights Reserved."