|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.stimulsoft.lib.base64.StiBase64DecoderUtil
public final class StiBase64DecoderUtil
Class decodes a Base64 encoded data back into the original byte representation and writes to output stream.
Constructor Summary | |
---|---|
StiBase64DecoderUtil(java.io.OutputStream stream)
Construct a Base64Decoder waiting on calls to its translate() method. |
Method Summary | |
---|---|
static byte[] |
decode(byte[] data)
Decode given byte array into a decoded byte array. |
static byte[] |
decode(byte[] data,
int begin,
int end)
Decode given byte array into a decoded byte array. |
static void |
decode(java.io.InputStream input,
java.io.OutputStream out)
Decode bytes from input stream and write decoded bytes to output stream. |
static void |
decode(java.io.InputStream input,
java.io.OutputStream out,
long count)
Decode bytes from input stream and write decoded bytes to output stream. |
static byte[] |
decode(java.lang.String str)
|
void |
flush()
Writes all decoded octets. |
StiBase64DecoderUtil |
translate(byte[] bytes)
Translate every base64 character from given byte array into a sextet byte value by using above translation array. |
StiBase64DecoderUtil |
translate(byte[] bytes,
int begin,
int end)
Translate every base64 character from given byte array into a sextet byte value by using above translation array. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StiBase64DecoderUtil(java.io.OutputStream stream)
Method Detail |
---|
public static void decode(java.io.InputStream input, java.io.OutputStream out) throws java.io.IOException
input
- input streamout
- output stream
java.io.IOException
- if an I/O error occurspublic static void decode(java.io.InputStream input, java.io.OutputStream out, long count) throws java.io.IOException
input
- input streamout
- output streamcount
- count of bytes to read and decode; -1 for all available bytes
java.io.IOException
- if an I/O error occurspublic static byte[] decode(java.lang.String str)
public static byte[] decode(byte[] data)
data
- Base64 byte array to be decoded.
public static byte[] decode(byte[] data, int begin, int end)
data
- Base64 byte array to be decodedbegin
- index of the first byte to start fromend
- index after the last byte
public StiBase64DecoderUtil translate(byte[] bytes) throws java.io.IOException
bytes
- the byte array to be decoded
java.io.IOException
- if an I/O error occurs. In particular, an IOException may be thrown if the output
stream has been closed.public StiBase64DecoderUtil translate(byte[] bytes, int begin, int end) throws java.io.IOException
bytes
- the byte array to be decodedbegin
- index of the first byte to start fromend
- index after the last byte
java.io.IOException
- if an I/O error occurs. In particular, an IOException may be thrown if the output
stream has been closed.public void flush() throws java.io.IOException
java.io.IOException
- if an I/O error occurs. In particular, an IOException may be thrown if the output
stream has been closed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |