com.sapportals.wcm.util.base64
Class Base64Decoder
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
com.sapportals.wcm.util.base64.Base64Decoder
- All Implemented Interfaces:
- Closeable
public class Base64Decoder
- extends FilterInputStream
A class to decode Base64 streams and strings.
|
Constructor Summary |
Base64Decoder(InputStream in)
Constructs a new Base64 decoder that reads input from the given
InputStream. |
|
Method Summary |
static String |
decode(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.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Base64Decoder
public Base64Decoder(InputStream in)
- Constructs a new Base64 decoder that reads input from the given
InputStream.
- Parameters:
in - the input stream
read
public int read()
throws IOException
- Returns the next decoded character from the stream, or -1 if end of stream
was reached.
- Overrides:
read in class FilterInputStream
- Returns:
- the decoded character, or -1 if the end of the input stream is
reached
- Throws:
IOException - if an I/O error occurs
read
public int read(byte[] b,
int off,
int len)
throws 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 FilterInputStream
- Parameters:
off - the start offset of the datalen - the maximum number of bytes to readb - 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:
IOException - if an I/O error occurs
decode
public static String decode(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
This class can be accessed from:
|
SC
|
DC
|
Public Part
|
ACH
|
[sap.com] KMC-CM
|
[sap.com] tc/km/frwk
|
api
|
EP-KM-CM
|
[sap.com] KMC-WPC
|
[sap.com] tc/kmc/wpc/wpcfacade
|
api
|
EP-PIN-WPC-WCM
|
Copyright 2014 SAP AG Complete Copyright Notice