Package javax.mail.internet
Class AsciiOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- javax.mail.internet.AsciiOutputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.io.Flushable
,java.lang.AutoCloseable
class AsciiOutputStream extends java.io.OutputStream
An OutputStream that determines whether the data written to it is all ASCII, mostly ASCII, or mostly non-ASCII.
-
-
Constructor Summary
Constructors Constructor Description AsciiOutputStream(boolean breakOnNonAscii, boolean encodeEolStrict)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
check(int b)
int
getAscii()
Return ASCII-ness of data stream.void
write(byte[] b)
void
write(byte[] b, int off, int len)
void
write(int b)
-
-
-
Method Detail
-
write
public void write(int b) throws java.io.IOException
- Specified by:
write
in classjava.io.OutputStream
- Throws:
java.io.IOException
-
write
public void write(byte[] b) throws java.io.IOException
- Overrides:
write
in classjava.io.OutputStream
- Throws:
java.io.IOException
-
write
public void write(byte[] b, int off, int len) throws java.io.IOException
- Overrides:
write
in classjava.io.OutputStream
- Throws:
java.io.IOException
-
check
private final void check(int b) throws java.io.IOException
- Throws:
java.io.IOException
-
getAscii
public int getAscii()
Return ASCII-ness of data stream.
-
-