Package cpod
Class CPODUtils
java.lang.Object
cpod.CPODUtils
Some useful utility function for CPOD and FPOD data
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic short
getBits
(short data, short bitMap) getCPODSpecies
(short species) Get the CPOD species from an int flagstatic CPODUtils.CPODFileType
getFileType
(File cpFile) getFPODSpecies
(short species) Get the FPOD species from an int flaggetSpecies
(String species) Get the species type from an enum value.static long
podTimeToMillis
(long podTime) Convert POD time to JAVA millis - POD time is integer minutes past the same epoc as Windows uses i.e.static short
toUnsigned
(byte signedByte) Java will only have read signed bytes.
-
Constructor Details
-
CPODUtils
public CPODUtils()
-
-
Method Details
-
toUnsigned
public static short toUnsigned(byte signedByte) Java will only have read signed bytes. Nick clearly uses a lot of unsigned data, so convert and inflate to int16.- Parameters:
signedByte
-- Returns:
- unsigned version as int16.
-
podTimeToMillis
public static long podTimeToMillis(long podTime) Convert POD time to JAVA millis - POD time is integer minutes past the same epoc as Windows uses i.e. 0th January 1900.- Parameters:
podTime
-- Returns:
- milliseconds.
-
getFileType
-
getCPODSpecies
Get the CPOD species from an int flag- Parameters:
species
- - integer flag representing the species- Returns:
- the ENUM species type.
-
getSpecies
Get the species type from an enum value.- Parameters:
species
- - the species type.- Returns:
- the species type.
-
getBits
public static short getBits(short data, short bitMap) -
getFPODSpecies
Get the FPOD species from an int flag- Parameters:
species
- - integer flag representing the species- Returns:
- the ENUM species type.
-