com.google.api
Class Files

java.lang.Object
  extended by com.google.api.Files

public class Files
extends java.lang.Object


Method Summary
static java.lang.String read(java.io.File file)
          Reads a file to a String.
static void write(java.io.File file, java.lang.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
 

Method Detail

write

public static void write(java.io.File file,
                         java.lang.String content)
                  throws java.io.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:
java.io.IOException - Thrown on IO errors.

read

public static java.lang.String read(java.io.File file)
                             throws java.io.IOException
Reads a file to a String.

Parameters:
file - The file to read from.
Returns:
The content of the file as a String.
Throws:
java.io.IOException - Thrown on IO errors.


Copyright © 2009-2010. All Rights Reserved.