Android Guides | Samples

Android.Util.Base64 Class

Utilities for encoding and decoding the Base64 representation of binary data.

See Also: Base64

Syntax

[Android.Runtime.Register("android/util/Base64", DoNotGenerateAcw=true)]
public class Base64 : Object

Remarks

Utilities for encoding and decoding the Base64 representation of binary data. See RFCs and .

[Android Documentation]

Requirements

Namespace: Android.Util
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 8

The members of Android.Util.Base64 are listed below.

See Also: Object

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Fields

const
CrlfBase64Flags (4). Encoder flag bit to indicate lines should be terminated with a CRLF pair instead of just an LF.
const
DefaultBase64Flags (0). Default values for encoder/decoder flags.
const
NoCloseBase64Flags (16). Flag to pass to Base64OutputStream to indicate that it should not close the output stream it is wrapping when it itself is closed.
const
NoPaddingBase64Flags (1). Encoder flag bit to omit the padding '=' characters at the end of the output (if any).
const
NoWrapBase64Flags (2). Encoder flag bit to omit all line terminators (i.e., the output will be on one long line).
const
UrlSafeBase64Flags (8). Encoder/decoder flag bit to indicate using the "URL and filename safe" variant of Base64 (see RFC 3548 section 4) where - and _ are used in place of + and /.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

static
Decode(Byte[], Base64Flags) : Byte[]
Decode the Base64-encoded data in input and return the data in a new byte array.
static
Decode(String, Base64Flags) : Byte[]
Decode the Base64-encoded data in input and return the data in a new byte array.
static
Decode(Byte[], Int32, Int32, Base64Flags) : Byte[]
Decode the Base64-encoded data in input and return the data in a new byte array.
static
Encode(Byte[], Base64Flags) : Byte[]
Base64-encode the given data and return a newly allocated byte[] with the result.
static
Encode(Byte[], Int32, Int32, Base64Flags) : Byte[]
Base64-encode the given data and return a newly allocated byte[] with the result.
static
EncodeToString(Byte[], Base64Flags) : String
Base64-encode the given data and return a newly allocated String with the result.
static
EncodeToString(Byte[], Int32, Int32, Base64Flags) : String
Base64-encode the given data and return a newly allocated String with the result.