com.google.api
Class Files
java.lang.Object
com.google.api.Files
public class Files
- extends Object
Method Summary |
static String |
read(File file)
Reads a file to a String. |
static void |
write(File file,
String content)
Writes a String to a given file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
write
public static void write(File file,
String content)
throws IOException
- Writes a String to a given file.
- Parameters:
file
- The file to write to.content
- The text to write to the given file.
- Throws:
IOException
- Thrown on IO errors.
read
public static String read(File file)
throws IOException
- Reads a file to a String.
- Parameters:
file
- The file to read from.
- Returns:
- The content of the file as a String.
- Throws:
IOException
- Thrown on IO errors.
Copyright © 2011. All Rights Reserved.