ByteArrayOutputStream.ToString Method

Definition

Overloads

ToString(Int32)
Obsolete.

Creates a newly allocated string.

ToString(String)

Converts the buffer's contents into a string by decoding the bytes using the named java.nio.charset.Charset charset.

ToString(Int32)

Caution

deprecated

Creates a newly allocated string.

[Android.Runtime.Register("toString", "(I)Ljava/lang/String;", "GetToString_IHandler")]
[System.Obsolete("deprecated")]
public virtual string ToString (int hibyte);
[<Android.Runtime.Register("toString", "(I)Ljava/lang/String;", "GetToString_IHandler")>]
[<System.Obsolete("deprecated")>]
override this.ToString : int -> string

Parameters

hibyte
Int32

the high byte of each resulting Unicode character.

Returns

String

the current contents of the output stream, as a string.

Attributes

Remarks

Java documentation for java.io.ByteArrayOutputStream.toString(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

ToString(String)

Converts the buffer's contents into a string by decoding the bytes using the named java.nio.charset.Charset charset.

[Android.Runtime.Register("toString", "(Ljava/lang/String;)Ljava/lang/String;", "GetToString_Ljava_lang_String_Handler")]
public virtual string ToString (string charsetName);
[<Android.Runtime.Register("toString", "(Ljava/lang/String;)Ljava/lang/String;", "GetToString_Ljava_lang_String_Handler")>]
override this.ToString : string -> string

Parameters

charsetName
String

the name of a supported java.nio.charset.Charset charset

Returns

String

String decoded from the buffer's contents.

Attributes

Exceptions

if the provided encoding is not supported.

Remarks

Java documentation for java.io.ByteArrayOutputStream.toString(java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to