com.sapportals.wcm.util.http
Class Base64
java.lang.Object
com.sapportals.wcm.util.http.Base64
- public class Base64
- extends Object
Yet another base64 implementation.
Copyright (c) SAP AG 2001-2003
|
Method Summary |
static byte[] |
decode(String buffer)
Base64 decode the string in the buffer according to RFC 2045. |
static String |
decodeString(String buffer)
Base64 decode the string in the buffer according to RFC 2045. |
static String |
encode(byte[] buffer)
Base64 encode the bytes in buffer according to RFC 2045. |
static String |
encode(byte[] buffer,
int linelen)
Base64 encode the bytes in buffer. |
static String |
encode(String buffer)
Base64 encode the string in buffer according to RFC 2045. |
static String |
encode(String buffer,
String encoding)
Base64 encode the string in buffer according to RFC 2045 with specified
character encoding. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Base64
public Base64()
encode
public static String encode(String buffer)
- Base64 encode the string in buffer according to RFC 2045. Default character
encoding is applied to buffer.
- Parameters:
buffer - TBD: Description of the incoming method parameter
- Returns:
- the encoded bytes
encode
public static String encode(String buffer,
String encoding)
throws UnsupportedEncodingException
- Base64 encode the string in buffer according to RFC 2045 with specified
character encoding.
- Parameters:
buffer - to encodeencoding - to use
- Returns:
- the encoded bytes
- Throws:
UnsupportedEncodingException
encode
public static String encode(byte[] buffer)
- Base64 encode the bytes in buffer according to RFC 2045.
- Parameters:
buffer - to encode
- Returns:
- the encoded bytes
encode
public static String encode(byte[] buffer,
int linelen)
- Base64 encode the bytes in buffer. Insert cr+lf after linelen characters.
- Parameters:
buffer - to encodelinelen - to use
- Returns:
- the encoded bytes
decode
public static byte[] decode(String buffer)
throws WcmException
- Base64 decode the string in the buffer according to RFC 2045.
- Parameters:
buffer - TBD: Description of the incoming method parameter
- Returns:
- the original bytes
- Throws:
WcmException - Exception raised in failure situation
decodeString
public static String decodeString(String buffer)
throws WcmException
- Base64 decode the string in the buffer according to RFC 2045. Convenience
method when it is known the the orignal consisted of characters. Platform
default charset applies!
- Parameters:
buffer - TBD: Description of the incoming method parameter
- Returns:
- the original string
- Throws:
WcmException - Exception raised in failure situation
Copyright 2006 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.