|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.borg.common.IOHelper
public class IOHelper
standard routines for file I/O with prompting
| Constructor Summary | |
|---|---|
IOHelper()
|
|
| Method Summary | |
|---|---|
static boolean |
checkOverwrite(String fname)
displays an overwrite confirm dialog if a file exists |
static OutputStream |
createOutputStream(String file)
create an output stream to a file, creating parent dirs as needed |
static OutputStream |
createOutputStream(URL url)
Creates an output stream to a URL |
static InputStream |
fileOpen(String startDirectory,
String title)
Prompt the user to choose a file to open |
static void |
fileSave(String startDirectory,
InputStream istr,
String defaultFilename)
prompt the user to pick a file for saving and save date to the file |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IOHelper()
| Method Detail |
|---|
public static InputStream fileOpen(String startDirectory,
String title)
throws Exception
startDirectory - the start directorytitle - the window title
Exception - the exception
public static void fileSave(String startDirectory,
InputStream istr,
String defaultFilename)
throws Exception
startDirectory - the start directoryistr - the stream to write out to the filedefaultFilename - the default filename
Exception - the exception
public static OutputStream createOutputStream(URL url)
throws Exception
url - the url
Exception - the exception
public static OutputStream createOutputStream(String file)
throws Exception
file - the file
Exception - the exceptionpublic static boolean checkOverwrite(String fname)
fname - the filename
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||