public class Utility
extends java.lang.Object
Constructor and Description |
---|
Utility() |
Modifier and Type | Method and Description |
---|---|
static boolean |
areContiguous(DataRecord first,
DataRecord second) |
static java.util.List<java.util.List<DataRecord>> |
breakContiguous(java.util.List<DataRecord> inList)
breaks the List into sublists where the DataRecords are contiguous.
|
static double |
bytesToDouble(byte[] info,
int start,
boolean swapBytes) |
static double |
bytesToDouble(byte a,
byte b,
byte c,
byte d,
byte e,
byte f,
byte g,
byte h,
boolean swapBytes) |
static float |
bytesToFloat(byte[] info,
int start,
boolean swapBytes) |
static float |
bytesToFloat(byte a,
byte b,
byte c,
byte d,
boolean swapBytes) |
static int |
bytesToInt(byte a) |
static int |
bytesToInt(byte[] info,
int start,
boolean swapBytes) |
static int |
bytesToInt(byte a,
byte b,
boolean swapBytes) |
static int |
bytesToInt(byte a,
byte b,
byte c,
boolean swapBytes) |
static int |
bytesToInt(byte a,
byte b,
byte c,
byte d,
boolean swapBytes) |
static long |
bytesToLong(byte[] info,
int start,
boolean swapBytes) |
static long |
bytesToLong(byte a,
byte b,
byte c,
byte d,
byte e,
byte f,
byte g,
byte h,
boolean swapBytes) |
static short |
bytesToShort(byte hi,
byte low,
boolean swapBytes) |
static void |
cleanDuplicatesOverlaps(java.util.List<DataRecord> drFromFileList) |
static byte[] |
doubleToByteArray(double d) |
static int |
extractInteger(byte[] info,
int start,
int length) |
static java.lang.String |
extractNullTermString(byte[] info,
int start,
int maxLength) |
static java.lang.String |
extractString(byte[] info,
int start,
int length) |
static java.lang.String |
extractVarString(byte[] info,
int start,
int maxLength) |
static byte[] |
floatToByteArray(float a) |
static byte[] |
format(byte[] source,
int start,
int end) |
static void |
insertFloat(float value,
byte[] dest,
int pos)
Inserts float into dest at index pos
|
static byte[] |
intToByteArray(int a) |
static byte[] |
longToByteArray(long a) |
static void |
main(java.lang.String[] args) |
static byte[] |
pad(byte[] source,
int requiredBytes,
byte paddingByte) |
static int |
uBytesToInt(byte a) |
static int |
uBytesToInt(byte a,
byte b,
boolean swapBytes) |
static void |
writeNullTermString(java.lang.String value,
int maxLength,
java.io.DataOutput out) |
public static int extractInteger(byte[] info, int start, int length)
public static java.lang.String extractString(byte[] info, int start, int length)
public static java.lang.String extractVarString(byte[] info, int start, int maxLength)
public static java.lang.String extractNullTermString(byte[] info, int start, int maxLength)
public static void writeNullTermString(java.lang.String value, int maxLength, java.io.DataOutput out) throws java.io.IOException
java.io.IOException
public static short bytesToShort(byte hi, byte low, boolean swapBytes)
public static int bytesToInt(byte a)
public static int uBytesToInt(byte a)
public static int bytesToInt(byte[] info, int start, boolean swapBytes)
public static long bytesToLong(byte[] info, int start, boolean swapBytes)
public static int bytesToInt(byte a, byte b, boolean swapBytes)
public static int uBytesToInt(byte a, byte b, boolean swapBytes)
public static int bytesToInt(byte a, byte b, byte c, boolean swapBytes)
public static int bytesToInt(byte a, byte b, byte c, byte d, boolean swapBytes)
public static long bytesToLong(byte a, byte b, byte c, byte d, byte e, byte f, byte g, byte h, boolean swapBytes)
public static float bytesToFloat(byte a, byte b, byte c, byte d, boolean swapBytes)
public static double bytesToDouble(byte a, byte b, byte c, byte d, byte e, byte f, byte g, byte h, boolean swapBytes)
public static double bytesToDouble(byte[] info, int start, boolean swapBytes)
public static float bytesToFloat(byte[] info, int start, boolean swapBytes)
public static byte[] intToByteArray(int a)
public static byte[] floatToByteArray(float a)
public static byte[] longToByteArray(long a)
public static byte[] doubleToByteArray(double d)
public static void insertFloat(float value, byte[] dest, int pos)
public static byte[] pad(byte[] source, int requiredBytes, byte paddingByte)
public static byte[] format(byte[] source, int start, int end)
public static boolean areContiguous(DataRecord first, DataRecord second)
public static java.util.List<java.util.List<DataRecord>> breakContiguous(java.util.List<DataRecord> inList)
public static void main(java.lang.String[] args)
public static void cleanDuplicatesOverlaps(java.util.List<DataRecord> drFromFileList)