|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.yajul.io.Base64Encoder
public class Base64Encoder
BASE64 encoder implementation. This object takes as parameter an input stream and an output stream. It encodes the input stream, using the BASE64 encoding rules, as defined in MIME specification and emit the resulting data to the output stream.
Base64OutputStream
,
Base64Decoder
Constructor Summary | |
---|---|
Base64Encoder(byte[] bytes)
Create a new Base64 encoder, to encode the given array of bytes. |
|
Base64Encoder(java.io.InputStream in,
java.io.OutputStream out)
Create a new Base64 encoder, encoding input to output. |
|
Base64Encoder(java.lang.String input)
Create a new Base64 encoder, to encode the given string. |
Method Summary | |
---|---|
static java.lang.String |
encode(byte[] bytes)
A static utility method that encodes an array of bytes. |
static java.lang.String |
encode(java.lang.String string)
A static utility method that encodes a string. |
void |
process()
Process the data: encode the input stream to the output stream. |
java.lang.String |
processString()
Encode the content of this encoder, as a string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Base64Encoder(java.lang.String input)
input
- The String to be encoded.public Base64Encoder(byte[] bytes)
bytes
- The String to be encoded.public Base64Encoder(java.io.InputStream in, java.io.OutputStream out)
in
- The input stream to be encoded.out
- The output stream, to write encoded data to.Method Detail |
---|
public void process() throws java.io.IOException
java.io.IOException
- If we weren't able to access the input stream or
the output stream.public java.lang.String processString()
public static java.lang.String encode(java.lang.String string)
string
- The input to be encoded.
public static java.lang.String encode(byte[] bytes)
bytes
- The input to be encoded.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |