Package org.subethamail.smtp.io
Class DotUnstuffingInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.subethamail.smtp.io.DotUnstuffingInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
Removes the dot-stuffing happening during the NNTP and SMTP message
transfer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int[]An array to hold the last two bytes read off the stream.Fields inherited from class java.io.FilterInputStream
in -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, reset, skipMethods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Field Details
-
last
protected int[] lastAn 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.
-
-
Constructor Details
-
DotUnstuffingInputStream
-
-
Method Details
-
read
Read through the stream, checking for '\r\n.'- Overrides:
readin classFilterInputStream- Returns:
- the byte read from the stream
- Throws:
IOException
-
read
Read through the stream, checking for '\r\n.'- Overrides:
readin classFilterInputStream- 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
- Throws:
IOException
-
getBaseStream
Provide access to the base input stream.
-