com.twelvemonkeys.io.enc
Class Base64Decoder
java.lang.Object
com.twelvemonkeys.io.enc.Base64Decoder
- All Implemented Interfaces:
- Decoder
public final class Base64Decoder
- extends Object
- implements Decoder
Decoder implementation for standard base64 encoding.
- Version:
- $Id: //depot/branches/personal/haraldk/twelvemonkeys/release-2/twelvemonkeys-core/src/main/java/com/twelvemonkeys/io/enc/Base64Decoder.java#2 $
- Author:
- Harald Kuhr
- See Also:
- RFC 1421,
,
Base64Encoder
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Base64Decoder
public Base64Decoder()
readFully
protected static int readFully(InputStream pStream,
byte[] pBytes,
int pOffset,
int pLength)
throws IOException
- Throws:
IOException
decodeAtom
protected boolean decodeAtom(InputStream pInput,
ByteBuffer pOutput,
int pLength)
throws IOException
- Throws:
IOException
decode
public int decode(InputStream stream,
ByteBuffer buffer)
throws IOException
- Description copied from interface:
Decoder
- Decodes up to
buffer.length bytes from the given input stream,
into the given buffer.
- Specified by:
decode in interface Decoder
- Parameters:
stream - the input stream to decode data frombuffer - buffer to store the read data
- Returns:
- the total number of bytes read into the buffer, or
0
if there is no more data because the end of the stream has been reached.
- Throws:
DecodeException - if encoded data is corrupt.
IOException - if an I/O error occurs.
EOFException - if a premature end-of-file is encountered.
Copyright © 2015. All Rights Reserved.