|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.InputStream
org.apache.james.mime4j.io.EOLConvertingInputStream
public class EOLConvertingInputStream
InputStream which converts \r
bytes not followed by \n and \n not
preceded by \r to \r\n.
| Field Summary | |
|---|---|
static int |
CONVERT_BOTH
Converts single '\r' and '\n' to '\r\n' |
static int |
CONVERT_CR
Converts single '\r' to '\r\n' |
static int |
CONVERT_LF
Converts single '\n' to '\r\n' |
| Constructor Summary | |
|---|---|
EOLConvertingInputStream(java.io.InputStream in)
Creates a new EOLConvertingInputStream
instance converting bytes in the given InputStream. |
|
EOLConvertingInputStream(java.io.InputStream in,
int flags)
Creates a new EOLConvertingInputStream
instance converting bytes in the given InputStream. |
|
| Method Summary | |
|---|---|
void |
close()
Closes the underlying stream. |
int |
read()
|
| Methods inherited from class java.io.InputStream |
|---|
available, mark, markSupported, read, read, reset, skip |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int CONVERT_CR
public static final int CONVERT_LF
public static final int CONVERT_BOTH
| Constructor Detail |
|---|
public EOLConvertingInputStream(java.io.InputStream in)
EOLConvertingInputStream
instance converting bytes in the given InputStream.
The flag CONVERT_BOTH is the default.
in - the InputStream to read from.
public EOLConvertingInputStream(java.io.InputStream in,
int flags)
EOLConvertingInputStream
instance converting bytes in the given InputStream.
in - the InputStream to read from.flags - one of CONVERT_CR, CONVERT_LF or
CONVERT_BOTH.| Method Detail |
|---|
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in class java.io.InputStreamjava.io.IOException - on I/O errors.
public int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionInputStream.read()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||