public class NOWRadheader
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String[] |
mons |
Constructor and Description |
---|
NOWRadheader() |
Modifier and Type | Method and Description |
---|---|
static int |
bytesToInt(byte[] bytes,
boolean swapBytes)
convert bytes into integer
|
static int |
bytesToInt(byte a,
byte b,
boolean swapBytes)
Concatenate two bytes to a 32-bit int value.
|
void |
close()
Close the file.
|
int |
convertShort2unsignedInt(short b)
convert short to unsigned integer
|
short |
convertunsignedByte2Short(byte b)
convert unsigned byte to short
|
void |
flush()
Flush all data buffers to disk.
|
byte[] |
getData(int offset) |
static java.util.Date |
getDate(int julianDays,
int msecs)
get jave date
|
boolean |
isValidFile(RandomAccessFile raf)
check if this file is a nids / tdwr file
|
void |
setProperty(java.lang.String name,
java.lang.String value) |
static int |
shortsToInt(short s1,
short s2,
boolean swapBytes)
convert two short into a integer
|
public boolean isValidFile(RandomAccessFile raf)
raf
- input filepublic byte[] getData(int offset) throws java.io.IOException
java.io.IOException
public void setProperty(java.lang.String name, java.lang.String value)
public static int shortsToInt(short s1, short s2, boolean swapBytes)
s1
- short ones2
- short twoswapBytes
- if swap bytespublic static int bytesToInt(byte[] bytes, boolean swapBytes)
bytes
- bytes arrayswapBytes
- if need to swappublic static int bytesToInt(byte a, byte b, boolean swapBytes)
a
- high order byteb
- low order byteswapBytes
- byte order swap flagpublic short convertunsignedByte2Short(byte b)
b
- convert this unsigned bytepublic int convertShort2unsignedInt(short b)
b
- convert this shortpublic static java.util.Date getDate(int julianDays, int msecs)
julianDays
- msecs
- public void flush() throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
java.io.IOException