Package org.eclipse.gef.dot.internal

# 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 Summary

Modifier and Type
Method
Description
`static String`
`read(File file)`
`static String`
`read(InputStream is)`
Reads a string from the given input stream.
`static File`
`resolve(URL url)`
`static File`
`write(String text)`
`static File`
`write(String text, File destination)`

### Methods inherited from class java.lang.Object

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

## 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.