|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.stimulsoft.lib.base64.StiBase64EncoderUtil
public class StiBase64EncoderUtil
Class encodes the bytes read from the InputStream to a Base64 encoded string and writes to output stream.
Constructor Summary | |
---|---|
StiBase64EncoderUtil(java.io.OutputStream stream)
Construct a Base64Encoder waiting on calls to its translate() method. |
Method Summary | |
---|---|
static byte[] |
encode(byte[] data)
Encode given byte array into an encoded byte array. |
static byte[] |
encode(byte[] data,
int begin,
int end)
Encode given byte array into an encoded byte array. |
static void |
encode(java.io.InputStream input,
java.io.OutputStream out)
Encode bytes from input stream and write encoded bytes to output stream. |
static java.lang.String |
encode(java.lang.String data)
|
void |
flush()
Writes all encoded characters. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StiBase64EncoderUtil(java.io.OutputStream stream)
stream
- stream to write encoded bytes toMethod Detail |
---|
public static void encode(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 byte[] encode(byte[] data)
data
- the byte array to be encoded
public static java.lang.String encode(java.lang.String data)
public static byte[] encode(byte[] data, int begin, int end)
data
- the byte array to be encodedbegin
- index of the first byte to start fromend
- index after the last byte
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 |