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.
-
readfile(String)
- Takes a file name and returns the content of the file in a
String object.
-
readUTF(String)
- Takes a file name, decodes the UTF-8 encoding,
and returns the content
of the file in a String object.
-
writefile(String, String)
- Saves a String object into a file.
-
writeUTF(String, String)
- Saves a String object into a file using UTF-8 encoding.
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.
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.
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.
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