public class LittleEndianBitConverter extends Object
| Modifier and Type | Method and Description | 
|---|---|
| static byte[] | getBytes(int value)Returns the specified 32-bit unsigned integer value as an array of bytes. | 
| static byte[] | getBytes(long value)Returns the specified 64-bit unsigned integer value as an array of bytes. | 
| static short | toInt16(byte[] array,
       int index)Returns a 16-bit signed integer converted from two bytes at a specified position in a byte array. | 
| static int | toInt32(byte[] array,
       int index)Returns a 32-bit signed integer converted from two bytes at a specified position in a byte array. | 
| static short | ToUInt16(byte[] array,
        int index)Returns a 16-bit unsigned integer converted from two bytes at a specified position in a byte array. | 
| static int | toUInt32(byte[] array,
        int index)Returns a 32-bit unsigned integer converted from two bytes at a specified position in a byte array. | 
| static long | toUInt64(byte[] array,
        int index)Returns a 64-bit unsigned integer converted from two bytes at a specified position in a byte array. | 
public static short ToUInt16(byte[] array,
                             int index)
                      throws IOException
array - Specify an array of bytes.index - Specify the starting position.IOExceptionpublic static int toUInt32(byte[] array,
                           int index)
                    throws IOException
array - Specify an array of bytes.index - Specify the starting position.IOExceptionpublic static int toInt32(byte[] array,
                          int index)
                   throws IOException
array - Specify an array of bytes.index - Specify the starting position.IOExceptionpublic static short toInt16(byte[] array,
                            int index)
                     throws IOException
array - Specify an array of bytes.index - Specify the starting position.IOExceptionpublic static long toUInt64(byte[] array,
                            int index)
                     throws IOException
array - Specify an array of bytes.index - Specify the starting position.IOExceptionpublic static byte[] getBytes(long value)
value - Specify the number to convert.public static byte[] getBytes(int value)
value - Specify the number to convert.Copyright © 2007–2022 The Apache Software Foundation. All rights reserved.