|
Apache JAMES Mime4j 0.6-redhat-2 | |||||||||
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(InputStream in)
Creates a new EOLConvertingInputStream
instance converting bytes in the given InputStream . |
|
EOLConvertingInputStream(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(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(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 IOException
close
in interface Closeable
close
in class InputStream
IOException
- on I/O errors.public int read() throws IOException
read
in class InputStream
IOException
InputStream.read()
|
Apache JAMES Mime4j 0.6-redhat-2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |