| java.lang.Object org.w3c.tools.codec.Base64Encoder
Base64Encoder | public class Base64Encoder (Code) | | 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.
See Also: org.w3c.tools.codec.Base64Decoder |
Method Summary | |
public static void | main(String args) Testing the encoder. | public void | process() Process the data: encode the input stream to the output stream. | public String | processString() Encode the content of this encoder, as a string. |
Base64Encoder | public Base64Encoder(String input)(Code) | | Create a new Base64 encoder, to encode the given string.
Parameters: input - The String to be encoded. |
Base64Encoder | public Base64Encoder(InputStream in, OutputStream out)(Code) | | Create a new Base64 encoder, encoding input to output.
Parameters: in - The input stream to be encoded. Parameters: out - The output stream, to write encoded data to. |
main | public static void main(String args)(Code) | | Testing the encoder.
Run with one argument, prints the encoded version of it.
|
process | public void process() throws IOException(Code) | | Process the data: encode the input stream to the output stream.
This method runs through the input stream, encoding it to the output
stream.
exception: IOException - If we weren't able to access the input stream orthe output stream. |
processString | public String processString()(Code) | | Encode the content of this encoder, as a string.
This methods encode the String content, that was provided at creation
time, following the BASE64 rules, as specified in the rfc1521.
A String, reprenting the encoded content of the input String. |
|
|