public final class Base64
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
decode(java.lang.String data)
Returns the byte array represented by the specified base64 encoded data.
|
static java.lang.String |
decodeAsString(java.lang.String data)
Returns the String decoding of the specified base64 encoded data.
|
static void |
decodeToFile(java.lang.String data,
java.io.File outFile)
Decodes the specified base64 encoded data but puts the output in to the
specified File.
|
static void |
decodeToStream(java.lang.String data,
java.io.OutputStream out)
Decodes the specified base64 encoded data but puts the output in to the
specified OutputStream.
|
static java.lang.String |
encode(byte[] data)
Returns a String encoding of the specified data in base64.
|
static byte[] |
encodeBytes(byte[] data,
int pos,
int len)
Returns a byte array encoding of the specified data in base64.
|
public static java.lang.String encode(byte[] data)
data - the data to be encodedpublic static java.lang.String decodeAsString(java.lang.String data)
data - the base64 encoded data to be decodedpublic static byte[] decode(java.lang.String data)
data - the base64 data to be decodedpublic static void decodeToFile(java.lang.String data,
java.io.File outFile)
throws java.io.IOException
data - a base64 encoding of some dataoutFile - the file to which the decoded data is to be writtenjava.io.IOExceptionpublic static void decodeToStream(java.lang.String data,
java.io.OutputStream out)
throws java.io.IOException
data - a base64 encoding of some dataout - the OutputStream to which the decoded data is to be writtenjava.io.IOExceptionpublic static byte[] encodeBytes(byte[] data,
int pos,
int len)
data - the data to be encodedpos - the starting position of the data to be encodedlen - the length of data to be encodedStarTeam SDK 17.0, Build 34
Copyright © 2019 Micro Focus or one of its affiliates. All rights reserved.