# Class IOUtils

java.lang.Object
htsjdk.beta.plugin.IOUtils

public class IOUtils extends Object
Class for updated IOUtils methods that use either `IOPath` `Path` in public method argument lists.

## Constructor Summary

Constructors
Constructor
Description
`IOUtils()`

## Method Summary

Modifier and Type
Method
Description
`static IOPath`
`createTempPath(String prefix, String suffix)`
Create a temporary file using a given name prefix and name suffix and return a `Path`.
`static String`
`getStringFromPath(IOPath ioPath)`
Get the entire contents of an IOPath as a string.
`static HtsPath`
`toHtsPath(Path toConvert)`
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.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### IOUtils

public IOUtils()

## Method Details

### createTempPath

public static IOPath createTempPath(String prefix, String suffix)
Create a temporary file using a given name prefix and name suffix and return a `Path`.

Parameters:
  `prefix` -
  `suffix` -
Returns:
  temp File that will be deleted on exit
Throws:
  `IOException`

### toHtsPath

public static HtsPath toHtsPath(Path toConvert)
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

public static String getStringFromPath(IOPath ioPath)
Get the entire contents of an IOPath as a string.

Parameters:
  `ioPath` -
Returns:
  a UTF-8 string representation of the file contents

### writeStringToPath

public static void writeStringToPath(IOPath ioPath, String contents, boolean gzipOutput)
Write a String to an IOPath.

Parameters:
  `ioPath` - path where contents should be written
  `contents` - a UTF-8 string to be written
  `gzipOutput` - if true, gzip output