Package htsjdk.beta.io
Class IOPathUtils
java.lang.Object
htsjdk.beta.io.IOPathUtils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic IOPath
createTempPath
(String prefix, String suffix) Create a temporary file using a given name prefix and name suffix and return aPath
.static String
getStringFromPath
(IOPath ioPath) Get the entire contents of an IOPath file as a string.static void
writeStringToPath
(IOPath ioPath, String contents) Write a String to an IOPath.
-
Constructor Details
-
IOPathUtils
public IOPathUtils()
-
-
Method Details
-
createTempPath
Create a temporary file using a given name prefix and name suffix and return aPath
.- Parameters:
prefix
- file name prefix to usesuffix
- file name suffix to use- Returns:
- IOPath for a temporary file that will be deleted on exit
- Throws:
IOException
- in IO failures
-
getStringFromPath
Get the entire contents of an IOPath file as a string.- Parameters:
ioPath
- ioPath to consume- Returns:
- a UTF-8 string representation of the file contents
-
writeStringToPath
Write a String to an IOPath.- Parameters:
ioPath
- path where contents should be writtencontents
- a UTF-8 string to be written
-