Package noaa.coastwatch.io
Class IOServices
java.lang.Object
noaa.coastwatch.io.IOServices
The IO services class defines various static methods relating
to input/output services.
- Since:
- 3.1.7
- Author:
- Peter Hollemans
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
Checks the setup of I/O services.static String
convertOctal
(String value) Converts octal escape sequences in the string to Java characters.static String
getFilePath
(Class resourceClass, String resourceName) Gets a file path for a resource name.static void
Prints a node and its children in XML syntax.static String
stripGroup
(String name) Removes the leading group path from a variable name.
-
Method Details
-
getFilePath
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
Converts octal escape sequences in the string to Java characters. -
printXML
Prints a node and its children in XML syntax.- Parameters:
root
- the root of the node tree to print.
-
checkSetup
Checks the setup of I/O services.- Returns:
- an error string if any issues encountered, or null if none.
-
stripGroup
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
-