Package htsjdk.beta.plugin
Class IOUtils
java.lang.Object
htsjdk.beta.plugin.IOUtils
-
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 as a string.static HtsPath
Convert Path to GATKPath, returning null if input was null.static void
writeStringToPath
(IOPath ioPath, String contents, boolean gzipOutput) Write a String to an IOPath.
-
Constructor Details
-
IOUtils
public IOUtils()
-
-
Method Details
-
createTempPath
Create a temporary file using a given name prefix and name suffix and return aPath
.- Parameters:
prefix
-suffix
-- Returns:
- temp File that will be deleted on exit
- Throws:
IOException
-
toHtsPath
Convert Path to GATKPath, returning null if input was null.- Parameters:
toConvert
- Path to convert to GATKPath- Returns:
- a Path, or null if the input was null.
-
getStringFromPath
Get the entire contents of an IOPath as a string.- Parameters:
ioPath
-- 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 writtengzipOutput
- if true, gzip output
-