Class Base64InputStream
java.lang.Object
java.io.InputStream
org.apache.james.mime4j.codec.Base64InputStream
- All Implemented Interfaces:
Closeable, AutoCloseable
Performs Base-64 decoding on an underlying stream.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final ThreadLocal<SoftReference<BufferRecycler>> private static final int[]private static final byteprivate booleanprivate final RecycledByteArrayBufferprivate final byte[]private static final intprivate booleanprivate static final intprivate final InputStreamprivate final DecodeMonitorprivate intprivate final byte[]private int -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBase64InputStream(int bufsize, InputStream in, DecodeMonitor monitor) Base64InputStream(InputStream in, boolean strict) Base64InputStream(InputStream in, DecodeMonitor monitor) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()private intdecodePad(int data, int sextets, byte[] buffer, int index, int end) static BufferRecyclerprivate voidhandleUnexpecedPad(int sextets) private voidhandleUnexpectedEof(int sextets) intread()intread(byte[] buffer) intread(byte[] buffer, int offset, int length) private intread0(byte[] buffer, int off, int len) Methods inherited from class InputStream
available, mark, markSupported, reset, skip
-
Field Details
-
_recyclerRef
-
ENCODED_BUFFER_SIZE
private static final int ENCODED_BUFFER_SIZE- See Also:
-
BASE64_DECODE
private static final int[] BASE64_DECODE -
BASE64_PAD
private static final byte BASE64_PAD- See Also:
-
EOF
private static final int EOF- See Also:
-
singleByte
private final byte[] singleByte -
in
-
encoded
private final byte[] encoded -
decodedBuf
-
position
private int position -
size
private int size -
closed
private boolean closed -
eof
private boolean eof -
monitor
-
-
Constructor Details
-
Base64InputStream
-
Base64InputStream
-
Base64InputStream
-
Base64InputStream
-
-
Method Details
-
getBufferRecycler
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
read0
- Throws:
IOException
-
decodePad
- Throws:
IOException
-
handleUnexpectedEof
- Throws:
IOException
-
handleUnexpecedPad
- Throws:
IOException
-