HexFormat.FormatHex Method

Definition

Overloads

FormatHex(Byte[])

Returns a hexadecimal string formatted from a byte array.

FormatHex(Object, Byte[])

Appends formatted hexadecimal strings from a byte array to the Appendable.

FormatHex(Byte[], Int32, Int32)

Returns a hexadecimal string formatted from a byte array range.

FormatHex(Object, Byte[], Int32, Int32)

Appends formatted hexadecimal strings from a byte array range to the Appendable.

FormatHex(Byte[])

Returns a hexadecimal string formatted from a byte array.

[Android.Runtime.Register("formatHex", "([B)Ljava/lang/String;", "", ApiSince=34)]
public string? FormatHex (byte[]? bytes);
[<Android.Runtime.Register("formatHex", "([B)Ljava/lang/String;", "", ApiSince=34)>]
member this.FormatHex : byte[] -> string

Parameters

bytes
Byte[]

a non-null array of bytes

Returns

a string hexadecimal formatting of the byte array

Attributes

Remarks

Returns a hexadecimal string formatted from a byte array. Each byte value is formatted as the prefix, two hexadecimal characters #isUpperCase selected from uppercase or lowercase digits, and the suffix. A delimiter follows each formatted value, except the last.

The behavior is equivalent to #formatHex(byte[], int, int) formatHex(bytes, 0, bytes.length)).

Java documentation for java.util.HexFormat.formatHex(byte[]).

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

FormatHex(Object, Byte[])

Appends formatted hexadecimal strings from a byte array to the Appendable.

[Android.Runtime.Register("formatHex", "(Ljava/lang/Appendable;[B)Ljava/lang/Appendable;", "", ApiSince=34)]
[Java.Interop.JavaTypeParameters(new System.String[] { "A extends java.lang.Appendable" })]
public Java.Lang.Object? FormatHex (Java.Lang.Object? out, byte[]? bytes);
[<Android.Runtime.Register("formatHex", "(Ljava/lang/Appendable;[B)Ljava/lang/Appendable;", "", ApiSince=34)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "A extends java.lang.Appendable" })>]
member this.FormatHex : Java.Lang.Object * byte[] -> Java.Lang.Object

Parameters

out
Object

an Appendable, non-null

bytes
Byte[]

a byte array

Returns

the Appendable

Attributes

Remarks

Appends formatted hexadecimal strings from a byte array to the Appendable. Each byte value is formatted as the prefix, two hexadecimal characters #isUpperCase selected from uppercase or lowercase digits, and the suffix. A delimiter follows each formatted value, except the last. The formatted hexadecimal strings are appended in zero or more calls to the Appendable methods.

Java documentation for java.util.HexFormat.formatHex(A, byte[]).

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

FormatHex(Byte[], Int32, Int32)

Returns a hexadecimal string formatted from a byte array range.

[Android.Runtime.Register("formatHex", "([BII)Ljava/lang/String;", "", ApiSince=34)]
public string? FormatHex (byte[]? bytes, int fromIndex, int toIndex);
[<Android.Runtime.Register("formatHex", "([BII)Ljava/lang/String;", "", ApiSince=34)>]
member this.FormatHex : byte[] * int * int -> string

Parameters

bytes
Byte[]

a non-null array of bytes

fromIndex
Int32

the initial index of the range, inclusive

toIndex
Int32

the final index of the range, exclusive

Returns

a string hexadecimal formatting each byte of the array range

Attributes

Remarks

Returns a hexadecimal string formatted from a byte array range. Each byte value is formatted as the prefix, two hexadecimal characters #isUpperCase selected from uppercase or lowercase digits, and the suffix. A delimiter follows each formatted value, except the last.

Java documentation for java.util.HexFormat.formatHex(byte[], int, 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

FormatHex(Object, Byte[], Int32, Int32)

Appends formatted hexadecimal strings from a byte array range to the Appendable.

[Android.Runtime.Register("formatHex", "(Ljava/lang/Appendable;[BII)Ljava/lang/Appendable;", "", ApiSince=34)]
[Java.Interop.JavaTypeParameters(new System.String[] { "A extends java.lang.Appendable" })]
public Java.Lang.Object? FormatHex (Java.Lang.Object? out, byte[]? bytes, int fromIndex, int toIndex);
[<Android.Runtime.Register("formatHex", "(Ljava/lang/Appendable;[BII)Ljava/lang/Appendable;", "", ApiSince=34)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "A extends java.lang.Appendable" })>]
member this.FormatHex : Java.Lang.Object * byte[] * int * int -> Java.Lang.Object

Parameters

out
Object

an Appendable, non-null

bytes
Byte[]

a byte array, non-null

fromIndex
Int32

the initial index of the range, inclusive

toIndex
Int32

the final index of the range, exclusive.

Returns

the Appendable

Attributes

Remarks

Appends formatted hexadecimal strings from a byte array range to the Appendable. Each byte value is formatted as the prefix, two hexadecimal characters #isUpperCase selected from uppercase or lowercase digits, and the suffix. A delimiter follows each formatted value, except the last. The formatted hexadecimal strings are appended in zero or more calls to the Appendable methods.

Java documentation for java.util.HexFormat.formatHex(A, byte[], int, 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