SAP NetWeaver '04

com.sapportals.wcm.util.base64
Class Base64Decoder

[contained in: com.sap.netweaver.bc.util.par - bc.util.public_api.jar]
java.lang.Object
  |
  +--java.io.InputStream
        |
        +--java.io.FilterInputStream
              |
              +--com.sapportals.wcm.util.base64.Base64Decoder

public class Base64Decoder
extends java.io.FilterInputStream

A class to decode Base64 streams and strings.


Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
Base64Decoder(java.io.InputStream in)
          Constructs a new Base64 decoder that reads input from the given InputStream.
 
Method Summary
static java.lang.String decode(java.lang.String encoded)
          Returns the decoded form of the given encoded string.
 int read()
          Returns the next decoded character from the stream, or -1 if end of stream was reached.
 int read(byte[] b, int off, int len)
          Reads decoded data into an array of bytes and returns the actual number of bytes read, or -1 if end of stream was reached.
 
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Base64Decoder

public Base64Decoder(java.io.InputStream in)
Constructs a new Base64 decoder that reads input from the given InputStream.
Parameters:
in - the input stream
Method Detail

read

public int read()
         throws java.io.IOException
Returns the next decoded character from the stream, or -1 if end of stream was reached.
Overrides:
read in class java.io.FilterInputStream
Returns:
the decoded character, or -1 if the end of the input stream is reached
Throws:
java.io.IOException - if an I/O error occurs

read

public int read(byte[] b,
                int off,
                int len)
         throws java.io.IOException
Reads decoded data into an array of bytes and returns the actual number of bytes read, or -1 if end of stream was reached.
Overrides:
read in class java.io.FilterInputStream
Parameters:
off - the start offset of the data
len - the maximum number of bytes to read
b - TBD: Description of the incoming method parameter
Returns:
the actual number of bytes read, or -1 if the end of the input stream is reached
Throws:
java.io.IOException - if an I/O error occurs

decode

public static java.lang.String decode(java.lang.String encoded)
Returns the decoded form of the given encoded string.
Parameters:
encoded - the string to decode
Returns:
the decoded form of the encoded string

SAP NetWeaver '04

Copyright © 2004 by SAP AG. All Rights Reserved.
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.