org.apache.james.mime4j.io
public class EOLConvertingInputStream extends java.io.InputStream
\r
bytes not followed by \n
and \n
not
preceded by \r
to \r\n
.Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
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 . |
public static final int CONVERT_CR
public static final int CONVERT_LF
public static final int CONVERT_BOTH
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
.public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class java.io.InputStream
java.io.IOException
- on I/O errors.public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
InputStream.read()
Copyright © 2004-2016. All Rights Reserved.