|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectTGFileIO
public class TGFileIO
Utility methods for getting stuff from files on the local computer.
Field Summary | |
---|---|
static java.lang.String |
CLASS_NAME
|
Constructor Summary | |
---|---|
TGFileIO()
|
Method Summary | |
---|---|
static java.lang.String |
getCurrentDirectory()
Return the current working directory. |
static java.awt.Image |
getImage(java.lang.String fileName)
Given a file name, read the picture file in and convert the contents into an Image. |
static PixelRectangle |
getPixRect(java.lang.String fileName)
Given a file name (of a picture file), read it in and convert its contents into a PixelRectangle. |
static java.lang.String[] |
getText(java.lang.String fileName)
Read the specified text file into an array of Strings, one for each line of text. |
static boolean |
isAbsolutePath(java.lang.String path)
Determine if a path is absolute (starts with a component that is a root of a file system). |
static java.lang.String[] |
pictFiles()
Return a String array of file names, each the name of a .bmp, .gif, .jpg, or .png picture file that is available for loading. |
static void |
setCurrentDirectory(java.lang.String path)
Set the current directory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CLASS_NAME
Constructor Detail |
---|
public TGFileIO()
Method Detail |
---|
public static java.lang.String getCurrentDirectory()
public static java.awt.Image getImage(java.lang.String fileName)
public static PixelRectangle getPixRect(java.lang.String fileName)
public static java.lang.String[] getText(java.lang.String fileName)
public static boolean isAbsolutePath(java.lang.String path)
public static java.lang.String[] pictFiles()
public static void setCurrentDirectory(java.lang.String path)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |