|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.mucommander.io.base64.Base64Encoder
public abstract class Base64Encoder
Base64Encoder provides methods to ease the encoding of strings and byte arrays in base64.
The Base64OutputStream class is used under the hood to perform the actual base64 encoding.
Base64OutputStream| Constructor Summary | |
|---|---|
Base64Encoder()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
encode(byte[] b)
Base64-encodes the given byte array and returns the result. |
static java.lang.String |
encode(byte[] b,
int off,
int len)
Base64-encodes the given byte array, from off to len, and returns the result. |
static java.lang.String |
encode(java.lang.String s)
Shorthand for encode(String, String) invoked with UTF-8 encoding. |
static java.lang.String |
encode(java.lang.String s,
java.lang.String encoding)
Base64-encodes the given String and returns result. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Base64Encoder()
| Method Detail |
|---|
public static java.lang.String encode(byte[] b)
b - the String to base64-encode
public static java.lang.String encode(byte[] b,
int off,
int len)
b - the String to base64-encodeoff - position to the first byte in the array to be encodedlen - number of bytes in the array to encode
public static java.lang.String encode(java.lang.String s)
encode(String, String) invoked with UTF-8 encoding.
s - the String to base64-encode
public static java.lang.String encode(java.lang.String s,
java.lang.String encoding)
throws java.io.UnsupportedEncodingException
s - the String to base64-encodeencoding - the character encoding to use for transforming the string into bytes
java.io.UnsupportedEncodingException - if the specified encoding is not supported by the Java runtime
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard