Package org.eclipse.gef.dot.internal
Class DotFileUtils
- java.lang.Object
-
- org.eclipse.gef.dot.internal.DotFileUtils
-
public final class DotFileUtils extends java.lang.ObjectStatic helper methods for working with files.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Stringread(java.io.File file)static java.lang.Stringread(java.io.InputStream is)Reads a string from the given input stream.static java.io.Fileresolve(java.net.URL url)static java.io.Filewrite(java.lang.String text)static java.io.Filewrite(java.lang.String text, java.io.File destination)
-
-
-
Method Detail
-
resolve
public static java.io.File resolve(java.net.URL url)
- Parameters:
url- The URL to resolve (can be workspace-relative)- Returns:
- The file corresponding to the given URL
-
write
public static java.io.File write(java.lang.String text)
- Parameters:
text- The string to write out to a temp file- Returns:
- The temp file containing the given string
-
write
public static java.io.File write(java.lang.String text, java.io.File destination)- Parameters:
text- The string to write out to a filedestination- The file to write the string to- Returns:
- The file containing the given string
-
read
public static java.lang.String read(java.io.File file)
- Parameters:
file- The file to read into a string- Returns:
- The string containing the contents of the given file
-
read
public static java.lang.String read(java.io.InputStream is) throws java.io.IOExceptionReads 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:
java.io.IOException- In case I/O exceptions occurred.
-
-