Class QuotedPrintableInputStream
java.lang.Object
java.io.InputStream
org.apache.james.mime4j.codec.QuotedPrintableInputStream
- All Implemented Interfaces:
Closeable, AutoCloseable
Performs Quoted-Printable decoding on an underlying stream.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final ThreadLocal<SoftReference<BufferRecycler>> private final RecycledByteArrayBufferprivate booleanprivate static final byteprivate final RecycledByteArrayBufferprivate static final intprivate final byte[]private static final byteprivate final InputStreamprivate booleanprivate static final byteprivate intprivate final DecodeMonitorprivate intprivate final byte[] -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedQuotedPrintableInputStream(int bufsize, InputStream in, boolean strict) protectedQuotedPrintableInputStream(int bufsize, InputStream in, DecodeMonitor monitor) QuotedPrintableInputStream(InputStream in, boolean strict) QuotedPrintableInputStream(InputStream in, DecodeMonitor monitor) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Terminates Quoted-Printable coded content.private intconvert(int c) Converts '0' => 0, 'A' => 10, etc.private intstatic BufferRecyclerprivate intgetnext()private intpeek(int i) intread()intread(byte[] b, int off, int len) private intread0(byte[] buffer, int off, int len) private inttransfer(int b, byte[] buffer, int from, int to, boolean keepblanks) Methods inherited from class InputStream
available, mark, markSupported, read, reset, skip
-
Field Details
-
_recyclerRef
-
DEFAULT_BUFFER_SIZE
private static final int DEFAULT_BUFFER_SIZE- See Also:
-
EQ
private static final byte EQ- See Also:
-
CR
private static final byte CR- See Also:
-
LF
private static final byte LF- See Also:
-
singleByte
private final byte[] singleByte -
in
-
decodedBuf
-
blanks
-
encoded
private final byte[] encoded -
pos
private int pos -
limit
private int limit -
lastWasCR
private boolean lastWasCR -
closed
private boolean closed -
monitor
-
-
Constructor Details
-
QuotedPrintableInputStream
-
QuotedPrintableInputStream
-
QuotedPrintableInputStream
-
QuotedPrintableInputStream
-
QuotedPrintableInputStream
-
-
Method Details
-
getBufferRecycler
-
close
public void close()Terminates Quoted-Printable coded content. This method does NOT close the underlying input stream.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream
-
fillBuffer
- Throws:
IOException
-
getnext
private int getnext() -
peek
private int peek(int i) -
transfer
- Throws:
IOException
-
read0
- Throws:
IOException
-
convert
private int convert(int c) Converts '0' => 0, 'A' => 10, etc.- Parameters:
c- ASCII character value.- Returns:
- Numeric value of hexadecimal character.
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-