Package cpod

Class CPODUtils

java.lang.Object
cpod.CPODUtils

public class CPODUtils extends Object
Some useful utility function for CPOD and FPOD data
  • 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

      public static CPODUtils.CPODFileType getFileType(File cpFile)
    • getCPODSpecies

      public static CPODClassification.CPODSpeciesType getCPODSpecies(short species)
      Get the CPOD species from an int flag
      Parameters:
      species - - integer flag representing the species
      Returns:
      the ENUM species type.
    • getSpecies

      public static CPODClassification.CPODSpeciesType getSpecies(String species)
      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

      public static CPODClassification.CPODSpeciesType getFPODSpecies(short species)
      Get the FPOD species from an int flag
      Parameters:
      species - - integer flag representing the species
      Returns:
      the ENUM species type.