Package org.apache.james.mime4j.codec
Class QuotedPrintableOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.FilterOutputStream
-
- org.apache.james.mime4j.codec.QuotedPrintableOutputStream
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
public class QuotedPrintableOutputStream extends FilterOutputStream
Performs Quoted-Printable encoding on an underlying stream. Encodes every "required" char plus the dot ".". We encode the dot by default because this is a workaround for some "filter"/"antivirus" "old mua" having issues with dots at the beginning or the end of a qp encode line (maybe a bad dot-destuffing algo).
-
-
Field Summary
-
Fields inherited from class java.io.FilterOutputStream
out
-
-
Constructor Summary
Constructors Constructor Description QuotedPrintableOutputStream(int bufsize, OutputStream out, boolean binary)
QuotedPrintableOutputStream(OutputStream out, boolean binary)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
flush()
void
write(byte[] b, int off, int len)
void
write(int b)
-
Methods inherited from class java.io.FilterOutputStream
write
-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
-
-
-
Constructor Detail
-
QuotedPrintableOutputStream
public QuotedPrintableOutputStream(int bufsize, OutputStream out, boolean binary)
-
QuotedPrintableOutputStream
public QuotedPrintableOutputStream(OutputStream out, boolean binary)
-
-
Method Detail
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classFilterOutputStream
- Throws:
IOException
-
flush
public void flush() throws IOException
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classFilterOutputStream
- Throws:
IOException
-
write
public void write(int b) throws IOException
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-
write
public void write(byte[] b, int off, int len) throws IOException
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-
-