public final class Base64Encoder
extends java.lang.Object
//kObjects // // Copyright (C) 2001 Stefan Haustein, Oberhausen (Rhld.), Germany // // Contributors: // // License: LGPL // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public License // as published by the Free Software Foundation; either version 2.1 of // the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, but // WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 // USA You can now use also javax.mail.internet.MimeUtility and sun.misc.BASE64Encoder.encode. There is a non-public class in Java 1.4+ called java.util.prefs.Base64
Constructor and Description |
---|
Base64Encoder() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
decode(java.lang.String s)
Decodes the given Base64 encoded String to a new byte array.
|
static java.lang.String |
encode(byte[] data) |
static java.lang.StringBuilder |
encode(byte[] data,
int start,
int len,
java.lang.StringBuilder buf)
Encodes the part of the given byte array denoted by start and
len to the Base64 format.
|
static java.lang.String |
encode(java.lang.String string) |
public static java.lang.String encode(java.lang.String string)
string
- public static java.lang.String encode(byte[] data)
public static java.lang.StringBuilder encode(byte[] data, int start, int len, java.lang.StringBuilder buf)
public static byte[] decode(java.lang.String s)