Class DotFileUtils

java.lang.Object
org.eclipse.gef.dot.internal.DotFileUtils

public final class DotFileUtils extends Object
Static helper methods for working with files.
  • Method Details

    • resolve

      public static File resolve(URL url)
      Parameters:
      url - The URL to resolve (can be workspace-relative)
      Returns:
      The file corresponding to the given URL
    • write

      public static File write(String text)
      Parameters:
      text - The string to write out to a temp file
      Returns:
      The temp file containing the given string
    • write

      public static File write(String text, File destination)
      Parameters:
      text - The string to write out to a file
      destination - The file to write the string to
      Returns:
      The file containing the given string
    • read

      public static String read(File file)
      Parameters:
      file - The file to read into a string
      Returns:
      The string containing the contents of the given file
    • read

      public static String read(InputStream is) throws IOException
      Reads a string from the given input stream.
      Parameters:
      is - The input stream to read.
      Returns:
      The contents of the input stream as a String
      Throws:
      IOException - In case I/O exceptions occurred.