|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectFileIO
public class FileIO
Class FileIO is used to read file I/O from local disk or URL CGI server. This work was produced by Peter Lemkin of the National Cancer Institute, an agency of the United States Government. As a work of the United States Government there is no associated copyright. It is offered as open source software under the Mozilla Public License (version 1.1) subject to the limitations noted in the accompanying LEGAL file. This notice must be included with the code. The Flicker Mozilla and Legal files are available on http://open2dprot.sourceforge.net/Flicker
This work was derived from MAExplorer under the Mozilla 1.1 Open Source Public License by Peter Lemkin of the National Cancer Institute, an agency of the United States Government subject to the limitations noted in the accompanying LEGAL file. See licence info on http://maexplorer.sourceforge.org/
Field Summary | |
---|---|
private Flicker |
flk
instance of Flicker |
private Util |
util
instance of Util |
Constructor Summary | |
---|---|
FileIO(Flicker flk)
FileIO() - constructor |
Method Summary | |
---|---|
java.lang.String[] |
getFilesInDir(java.lang.String dir,
java.lang.String ext)
getFilesInDir() - get list of files in directory the specified file extension |
java.lang.String[] |
getFilesWithLegalExtnInDir(java.lang.String dir,
java.lang.String[] legalExtList)
getFilesWithLegalExtnInDir() - get list of files in directory with one of the specified file extensions |
java.lang.String |
readData(java.lang.String fileName,
java.lang.String msg)
readData() - read data from URL or file depending on prefix. |
java.lang.String |
readData(java.lang.String fileName,
java.lang.String msg,
boolean usePopupAlertsFlag)
readData() - read data from URL or file depending on prefix. |
java.lang.String |
readFileFromDisk(java.lang.String fileName)
readFileFromDisk() - Will read file from disk & returns as String Allow popup error messages. |
java.lang.String |
readFileFromDisk(java.lang.String fileName,
boolean usePopupAlertsFlag)
readFileFromDisk() - Will read file from disk & returns as String |
java.lang.String |
readFileFromUrl(java.lang.String URLaddress)
readFileFromUrl() - read data from http URL, using JavaCGIBridge If the code has "\r\n", then map them to "\n". |
(package private) boolean |
writeFileToDisk(java.lang.String fileName,
java.lang.String data)
writeFileToDisk() - write string data to a local disk file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private Flicker flk
private Util util
Constructor Detail |
---|
FileIO(Flicker flk)
flk
- is instance of FlickerMethod Detail |
---|
public java.lang.String readData(java.lang.String fileName, java.lang.String msg)
fileName
- to readmsg
- to display while reading
public java.lang.String readData(java.lang.String fileName, java.lang.String msg, boolean usePopupAlertsFlag)
fileName
- to readmsg
- to display while readingusePopupAlertsFlag
- if allow popup error messages
public java.lang.String readFileFromDisk(java.lang.String fileName)
fileName
- to read
public java.lang.String readFileFromDisk(java.lang.String fileName, boolean usePopupAlertsFlag)
fileName
- to readusePopupAlertsFlag
- if allow popup error messages
public java.lang.String readFileFromUrl(java.lang.String URLaddress)
URLaddress
- to read web page as string from serverboolean writeFileToDisk(java.lang.String fileName, java.lang.String data)
fileName
- is the full path filename to write the datadata
- is the string to write to the file.
public java.lang.String[] getFilesWithLegalExtnInDir(java.lang.String dir, java.lang.String[] legalExtList)
dir
- directory to readlegalExtList
- is the file extensions list
(e.g. {".tif", ".jpg", ...}) to match if not null,
else accept all files
public java.lang.String[] getFilesInDir(java.lang.String dir, java.lang.String ext)
dir
- directory to readext
- is the file extension (e.g. ".tif") to match if not null,
else accept all files
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |