Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
To Top Created with Sketch. To Top
To Bottom Created with Sketch. To Bottom
JavaSE Documentation
BitConverter

Class BitConverter

Hierarchy

java.lang.Object

Package
com.smartdevicelink.util

Constructors

BitConverter()

public BitConverter()

Methods

bytesToHex( byte[] bytes )

public static java.lang.String bytesToHex(byte[] bytes)

Method Parameters

bytes
byte array that will be converted to hex

bytesToHex( byte[] bytes, int offset, int length )

public static java.lang.String bytesToHex(byte[] bytes,int offset,int length)

Method Parameters

bytes
byte array that will be converted to hex
offset
int representing the offset to begin conversion at
length
int representing number of bytes in array to convert

hexToBytes( String hexString )

public static byte hexToBytes(String hexString)

Method Parameters

hexString
the String containing converted hex values

intToByteArray( int value )

public static final byte intToByteArray(int value)

Method Parameters

value

intFromByteArray( byte[] sizeBuf, int offset )

public static int intFromByteArray(byte[] sizeBuf,int offset)

Method Parameters

sizeBuf
byte array that will be converted to int
offset
The position indicating where to begin converting.

shortToByteArray( short value )

public static final byte shortToByteArray(short value)

Method Parameters

value

shortFromByteArray( byte[] sizeBuf, int offset )

public static short shortFromByteArray(byte[] sizeBuf,int offset)

Method Parameters

sizeBuf
byte array that will be converted to short
offset
The position indicating where to begin converting.

bytesToHex( byte[] bytes, int end )

Converts the byte array into a string of hex values.

public static java.lang.String bytesToHex(byte[] bytes,int end)

Method Parameters

bytes
byte array that will be converted to hex
end
EXCLUSIVE so if it receives 10 it will print 0-9

Inherited Methods

From Class Methods
java.lang.Object getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize
View on GitHub.com
Previous Section Next Section