Class cynosurex.io.ioRoutines
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class cynosurex.io.ioRoutines

java.lang.Object
   |
   +----cynosurex.io.ioRoutines

public final class ioRoutines
extends Object
The ioRoutines class contains several useful class fields and methods. It cannot be instantiated.

Method Index

 o readfile(String)
Takes a file name and returns the content of the file in a String object.
 o readUTF(String)
Takes a file name, decodes the UTF-8 encoding, and returns the content of the file in a String object.
 o writefile(String, String)
Saves a String object into a file.
 o writeUTF(String, String)
Saves a String object into a file using UTF-8 encoding.

Methods

 o readfile
  public static String readfile(String filename) throws IOException, FileNotFoundException
Takes a file name and returns the content of the file in a String object.
 o writefile
  public static void writefile(String filename,
                               String str) throws IOException
Saves a String object into a file.
Parameters:
filename - - the name of the file.
str - - the String object to be saved into the file.
 o readUTF
  public static String readUTF(String filename) throws IOException, FileNotFoundException
Takes a file name, decodes the UTF-8 encoding, and returns the content of the file in a String object.
 o writeUTF
  public static void writeUTF(String filename,
                              String str) throws IOException
Saves a String object into a file using UTF-8 encoding.
Parameters:
filename - - the name of the file.
str - - the String object to be saved into the file.

All Packages  Class Hierarchy  This Package  Previous  Next  Index