boofcv.io
Class UtilIO
- java.lang.Object
-
- boofcv.io.UtilIO
-
public class UtilIO extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor and Description UtilIO()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static voiddeleteRecursive(java.io.File f)Deletes all the file/directory and all of its childrenstatic java.lang.StringgetPathToBase()Steps back until it finds the base BoofCV directory.static <T> Tload(java.lang.String fileName)static booleanloadLibrary(java.lang.String libraryName)static voidloadLibrarySmart(java.lang.String libraryName)static <T> TloadXML(java.io.Reader r)static <T> TloadXML(java.lang.String fileName)static <T> TloadXML(java.lang.String directory, java.lang.String fileName)static <T> TloadXML(java.net.URL url)static java.lang.Stringpath(java.lang.String path)Searches for the root BoofCV directory and returns an absolute path from it.static java.lang.StringpathExample(java.lang.String path)Returns an absolute path to the file that is relative to the example directorystatic voidsave(java.lang.Object o, java.lang.String fileName)static voidsaveXML(java.lang.Object o, java.lang.String fileName)static java.lang.StringselectFile(boolean exitOnCancel)Opens up a dialog box asking the user to select a file.
-
-
-
Method Detail
-
pathExample
public static java.lang.String pathExample(java.lang.String path)
Returns an absolute path to the file that is relative to the example directory- Parameters:
path- File path relative to root directory- Returns:
- Absolute path to file
-
path
public static java.lang.String path(java.lang.String path)
Searches for the root BoofCV directory and returns an absolute path from it.- Parameters:
path- File path relative to root directory- Returns:
- Absolute path to file
-
getPathToBase
public static java.lang.String getPathToBase()
Steps back until it finds the base BoofCV directory.- Returns:
- Path to the base directory.
-
selectFile
public static java.lang.String selectFile(boolean exitOnCancel)
Opens up a dialog box asking the user to select a file. If the user cancels it either returns null or quits the program.- Parameters:
exitOnCancel- If it should quit on cancel or not.- Returns:
- Name of the selected file or null if nothing was selected.
-
loadLibrarySmart
public static void loadLibrarySmart(java.lang.String libraryName)
-
loadLibrary
public static boolean loadLibrary(java.lang.String libraryName)
-
saveXML
public static void saveXML(java.lang.Object o, java.lang.String fileName)
-
loadXML
public static <T> T loadXML(java.net.URL url)
-
loadXML
public static <T> T loadXML(java.lang.String directory, java.lang.String fileName)
-
loadXML
public static <T> T loadXML(java.lang.String fileName)
-
loadXML
public static <T> T loadXML(java.io.Reader r)
-
save
public static void save(java.lang.Object o, java.lang.String fileName)
-
load
public static <T> T load(java.lang.String fileName)
-
deleteRecursive
public static void deleteRecursive(java.io.File f)
Deletes all the file/directory and all of its children
-
-
DataMelt 3.0 © DataMelt by jWork.ORG