Class IOPathUtils

java.lang.Object
htsjdk.beta.io.IOPathUtils

public class IOPathUtils extends Object
  • Constructor Details

    • IOPathUtils

      public IOPathUtils()
  • 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 - file name prefix to use
      suffix - file name suffix to use
      Returns:
      IOPath for a temporary file that will be deleted on exit
      Throws:
      IOException - in IO failures
    • getStringFromPath

      public static String getStringFromPath(IOPath ioPath)
      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

      public static void writeStringToPath(IOPath ioPath, String contents)
      Write a String to an IOPath.
      Parameters:
      ioPath - path where contents should be written
      contents - a UTF-8 string to be written