public final class GribNumbers
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int[] |
bitmask |
static int |
MISSING
Grib uses this internally to mean missing
|
static int |
UNDEFINED
if missing value is not defined use this value.
|
static double |
UNDEFINEDD |
Constructor and Description |
---|
GribNumbers() |
Modifier and Type | Method and Description |
---|---|
static int |
convertSignedByte(byte v)
A signed byte has a sign bit then 1 15-bit value.
|
static int |
convertSignedByte2(byte v) |
static int |
countBits(byte[] bitmap) |
static float |
float4(int a,
int b,
int c,
int d)
Convert 4 bytes to a float.
|
static float |
float4(RandomAccessFile raf)
Convert 4 bytes into a float value.
|
static int |
getMaskForBit(int gribBitNumber) |
static int |
int2(int a,
int b)
convert 2 bytes to a signed integer.
|
static int |
int2(RandomAccessFile raf)
Convert 2 bytes into a signed integer.
|
static int |
int3(int a,
int b,
int c)
Convert 3 bytes to signed integer.
|
static int |
int3(RandomAccessFile raf)
Convert 3 bytes into a signed integer.
|
static int |
int4(int a,
int b,
int c,
int d)
Convert 4 bytes into a signed integer.
|
static int |
int4(RandomAccessFile raf)
Convert 4 bytes into a signed integer.
|
static long |
int8(RandomAccessFile raf)
Convert 8 bytes into a signed long.
|
static boolean |
isUndefined(double d) |
static void |
main(java.lang.String[] args) |
static boolean |
testBitIsSet(int test,
int gribBitNumber) |
static int |
uint(RandomAccessFile raf)
Convert unsigned bytes into an integer.
|
static int |
uint2(int a,
int b)
convert 2 bytes to an unsigned integer.
|
static int |
uint2(RandomAccessFile raf)
Convert 2 bytes into an unsigned integer.
|
static int |
uint3(int a,
int b,
int c)
Convert 3 bytes into an unsigned int.
|
static int |
uint3(RandomAccessFile raf)
Convert 3 bytes into an unsigned integer.
|
public static final int UNDEFINED
public static final double UNDEFINEDD
public static final int[] bitmask
public static final int MISSING
public static int getMaskForBit(int gribBitNumber)
public static boolean testBitIsSet(int test, int gribBitNumber)
public static boolean isUndefined(double d)
public static int int2(RandomAccessFile raf) throws java.io.IOException
raf
- read from herejava.io.IOException
- on read errorpublic static int uint(RandomAccessFile raf) throws java.io.IOException
raf
- read one byte from herejava.io.IOException
- on read errorpublic static int int2(int a, int b)
a
- first byteb
- second bytepublic static int int3(RandomAccessFile raf) throws java.io.IOException
raf
- read from herejava.io.IOException
- on read errorpublic static int int3(int a, int b, int c)
a
- first byteb
- second bytec
- third bytepublic static int int4(RandomAccessFile raf) throws java.io.IOException
raf
- read from herejava.io.IOException
- on read errorpublic static int int4(int a, int b, int c, int d)
a
- first byteb
- second bytec
- third byted
- fourth bytepublic static int uint2(RandomAccessFile raf) throws java.io.IOException
raf
- read from herejava.io.IOException
- on read errorpublic static int uint2(int a, int b)
a
- first byteb
- second bytepublic static int uint3(RandomAccessFile raf) throws java.io.IOException
raf
- read from herejava.io.IOException
- on read errorpublic static int uint3(int a, int b, int c)
a
- first byteb
- second bytec
- third bytepublic static float float4(RandomAccessFile raf) throws java.io.IOException
raf
- read from herejava.io.IOException
- on read errorpublic static float float4(int a, int b, int c, int d)
a
- first byteb
- second bytec
- third byted
- fourth bytepublic static long int8(RandomAccessFile raf) throws java.io.IOException
raf
- RandomAccessFilejava.io.IOException
- on read errorpublic static int convertSignedByte(byte v)
v
- convert byte to signed intpublic static int convertSignedByte2(byte v)
public static int countBits(byte[] bitmap)
public static void main(java.lang.String[] args)