Class IOServices

java.lang.Object
noaa.coastwatch.io.IOServices

public class IOServices extends Object
The IO services class defines various static methods relating to input/output services.
Since:
3.1.7
Author:
Peter Hollemans
  • Method Details

    • getFilePath

      public static String getFilePath(Class resourceClass, String resourceName) throws IOException
      Gets a file path for a resource name.
      Parameters:
      resourceClass - the class requesting the resource.
      resourceName - the resource name.
      Returns:
      the full path to the resource file.
      Throws:
      IOException - if the resource cannot be resolved to a pathname, or the file is not readable.
    • convertOctal

      public static String convertOctal(String value)
      Converts octal escape sequences in the string to Java characters.
    • printXML

      public static void printXML(Node root)
      Prints a node and its children in XML syntax.
      Parameters:
      root - the root of the node tree to print.
    • checkSetup

      public static String checkSetup()
      Checks the setup of I/O services.
      Returns:
      an error string if any issues encountered, or null if none.
    • stripGroup

      public static String stripGroup(String name)
      Removes the leading group path from a variable name.
      Parameters:
      name - the full variable name.
      Returns:
      the modified variable name wothout leading group path. If no group path is found, the name is returned unmodified.
      Since:
      3.8.0