public class BinaryPDS4ConversionUtils extends Object
Constructor and Description |
---|
BinaryPDS4ConversionUtils() |
Modifier and Type | Method and Description |
---|---|
static long |
convertByte(byte[] b,
int n)
Converts an array of bytes into a long, permitting unsigned bytes.
|
static int |
convertByteArrayToInt(byte[] b)
Convert a byte array of size 4 bytes to type int
|
static long |
convertByteArrayToLong(byte[] b)
Convert a byte array of size 8 bytes to type long
|
static short |
convertByteArrayToShort(byte[] b)
Convert a byte array of size 2 bytes to type short
|
static long |
convertSignedLSBIntegers(byte[] b,
int n)
Converts an array of bytes into an int.
|
static long |
convertSignedMSBIntegers(byte[] b,
int n)
Converts an array of bytes into an int.
|
static long |
convertUnsignedLSBIntegers(byte[] b,
int n)
Converts an array of bytes into a long, permitting unsigned bytes.
|
static long |
convertUnsignedMSBIntegers(byte[] b,
int n)
Converts an array of bytes into a long, permitting unsigned bytes.
|
static long |
IEEE754LSBToIEEE754MSBDouble(byte[] b)
Convert from IEEE754LSBDouble type to IEEE754MSBDouble precision
|
static int |
IEEE754LSBToIEEE754MSBSingle(byte[] b)
Convert from IEEE754LSBSingle type to IEEE754MSBSingle precision
|
public static long convertSignedLSBIntegers(byte[] b, int n)
b
- the array of bytes, in little-endian ordern
- the number of bytes to convert in the array, from 1 to the
size of an intpublic static long convertUnsignedLSBIntegers(byte[] b, int n)
b
- the array of bytes, in big-endian ordern
- the number of bytes to convert in the array, from 1 to the
size of an intpublic static long convertSignedMSBIntegers(byte[] b, int n)
b
- the array of bytes, in big-endian ordern
- the number of bytes to convert in the array, from 1 to the
size of an intpublic static long convertUnsignedMSBIntegers(byte[] b, int n)
b
- the array of bytes, in big-endian ordern
- the number of bytes to convert in the array, from 1 to the
size of an intpublic static long convertByte(byte[] b, int n)
b
- the array of bytes, in big-endian ordern
- the number of bytes to convert in the array, from 1 to the
size of an intpublic static long convertByteArrayToLong(byte[] b)
b:
- byte array of size 8 bytespublic static int convertByteArrayToInt(byte[] b)
b:
- byte array if size 4 bytespublic static short convertByteArrayToShort(byte[] b)
b:
- byte array if size 2 bytespublic static int IEEE754LSBToIEEE754MSBSingle(byte[] b)
b
- - byte array of size 4 bytespublic static long IEEE754LSBToIEEE754MSBDouble(byte[] b)
b
- - byte array of size 8 bytesCopyright © 2010–2018 Planetary Data System. All rights reserved.