|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.grib.GribNumbers
public final class GribNumbers
A class that contains several static methods for converting multiple bytes into one float or integer.
| Field Summary | |
|---|---|
static int |
BIT_1
Bit mask for bit 1 in an octet |
static int |
BIT_2
Bit mask for bit 1 in an octet |
static int |
BIT_3
Bit mask for bit 1 in an octet |
static int |
BIT_4
Bit mask for bit 1 in an octet |
static int |
BIT_5
Bit mask for bit 1 in an octet |
static int |
BIT_6
Bit mask for bit 1 in an octet |
static int |
BIT_7
Bit mask for bit 1 in an octet |
static int |
BIT_8
Bit mask for bit 1 in an octet |
static int |
MISSING
Grib uses this internal to mean missing |
static int |
UNDEFINED
if missing value is not defined use this value. |
| Constructor Summary | |
|---|---|
GribNumbers()
|
|
| Method Summary | |
|---|---|
static boolean |
closeEnough(double v1,
double v2)
|
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 |
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 |
isBitSet(int value,
int bitMask)
Is the bit set in this octet |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int UNDEFINED
public static final int MISSING
public static final int BIT_1
public static final int BIT_2
public static final int BIT_3
public static final int BIT_4
public static final int BIT_5
public static final int BIT_6
public static final int BIT_7
public static final int BIT_8
| Constructor Detail |
|---|
public GribNumbers()
| Method Detail |
|---|
public static int int2(RandomAccessFile raf)
throws IOException
raf -
IOException
public static int int2(int a,
int b)
a - b -
public static int int3(RandomAccessFile raf)
throws IOException
raf -
IOException
public static int int3(int a,
int b,
int c)
a - b - c -
public static int int4(RandomAccessFile raf)
throws IOException
raf -
IOException
public static int int4(int a,
int b,
int c,
int d)
a - b - c - d -
public static int uint2(RandomAccessFile raf)
throws IOException
raf -
IOException
public static int uint2(int a,
int b)
a - b -
public static int uint3(RandomAccessFile raf)
throws IOException
raf -
IOException
public static int uint3(int a,
int b,
int c)
a - b - c -
public static float float4(RandomAccessFile raf)
throws IOException
raf -
IOException
public static float float4(int a,
int b,
int c,
int d)
a - b - c - d -
public static long int8(RandomAccessFile raf)
throws IOException
raf - RandomAccessFile
IOException
public static boolean isBitSet(int value,
int bitMask)
value - octet as an integerbitMask - bit mask
public static boolean closeEnough(double v1,
double v2)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||