|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.rssowl.util.shop.SimpleFileShop
net.sourceforge.rssowl.util.shop.FileShop
public class FileShop
Factory class for some File concerns in RSSOwl
| Field Summary |
|---|
| Fields inherited from class net.sourceforge.rssowl.util.shop.SimpleFileShop |
|---|
OP_ABORTED, OP_FAILED, OP_SUCCESSFULL |
| Constructor Summary | |
|---|---|
private |
FileShop()
This utility class constructor is hidden |
| Method Summary | |
|---|---|
(package private) static void |
copyXML(java.lang.String url,
java.lang.String dest)
Copy a XML to another file |
static boolean |
exists(java.lang.String path)
Check if the given Path points to an existing file. |
static void |
exportCategory(Shell parent,
java.lang.String name,
java.lang.String[] format)
Open a FileDialog for the user to choose where to export the XML holding the category(s). |
static void |
exportUserSettings(Shell parent)
Open a FileDialog for the user to choose where to export the "user.xml" |
static java.lang.String |
getContent(java.io.InputStream inS)
Read the contents from an InputStream into a String. |
static java.lang.String |
getContent(java.net.URL url)
Read the contents from an URL into a String. |
static java.lang.String |
getFilePath(Shell parent,
java.lang.String[] formats,
java.lang.String fileName,
int style,
java.lang.String path,
java.lang.String title)
Get a path to a file from the user |
static java.lang.String |
getFilePath(java.lang.String[] formats,
java.lang.String fileName,
int style,
java.lang.String path,
java.lang.String title)
Get a path to a file from the user |
static java.lang.String |
getSavePath(java.lang.String fileName,
java.lang.String format,
java.lang.String title)
Get the FilePath from the user to save the file |
static int |
importUserSettings(Shell parent)
Open a FileDialog for the user to choose from which file the settings should be imported |
static boolean |
isMediumWriteable(java.io.File file)
Test if the medium from where RSSOwl is executed is writeable |
private static boolean |
overwrite()
Open dialog to ask if the file should be overwritten |
static void |
saveRSSXML(java.lang.String rssUrl,
java.lang.String fileName)
Open a FileDialog for the user to choose where to save the RSS XML of the selected news feed |
static boolean |
saveSelectedNewsFeed()
Save current selected news XML to a file |
static java.lang.String |
suggestRSSFileName(java.lang.String initName)
Suggest a filename for a RSS newsfeed with using the current date. |
| Methods inherited from class net.sourceforge.rssowl.util.shop.SimpleFileShop |
|---|
copy, copy, copy |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
private FileShop()
| Method Detail |
|---|
public static boolean exists(java.lang.String path)
path - The path to check.
public static void exportCategory(Shell parent,
java.lang.String name,
java.lang.String[] format)
throws java.io.IOException
parent - The parent Shell of the Dialogname - Suggested name for the fileformat - Preselected formats
java.io.IOException - If an IO Error occurs
public static void exportUserSettings(Shell parent)
throws java.io.IOException
parent - The parent Shell of the Dialog
java.io.IOException - If an IO Error occurspublic static java.lang.String getContent(java.io.InputStream inS)
inS - Any InputStream (e.g. from an URL)
public static java.lang.String getContent(java.net.URL url)
throws java.io.IOException
url - Any valid URL that is online
java.io.IOException - If an error occurs
public static java.lang.String getFilePath(Shell parent,
java.lang.String[] formats,
java.lang.String fileName,
int style,
java.lang.String path,
java.lang.String title)
parent - The parent Shell of the dialogformats - List of selectable file extensionsfileName - The preselected filename for the dialogstyle - Either SWT.OPEN or SWT.SAVEpath - If not NULL browser into given directorytitle - The Dialogs Title or NULL if none.
public static java.lang.String getFilePath(java.lang.String[] formats,
java.lang.String fileName,
int style,
java.lang.String path,
java.lang.String title)
formats - List of selectable file extensionsfileName - The preselected filename for the dialogstyle - Either SWT.OPEN or SWT.SAVEpath - If not NULL browser into given directorytitle - The Dialogs Title or NULL if none.
public static java.lang.String getSavePath(java.lang.String fileName,
java.lang.String format,
java.lang.String title)
fileName - Preselected filenameformat - Format of the file to savetitle - The Dialogs Title or NULL if none.
public static int importUserSettings(Shell parent)
throws java.io.IOException
parent - The parent Shell of the Dialog
java.io.IOException - If an IO Error occurspublic static boolean isMediumWriteable(java.io.File file)
file - A file to write
public static void saveRSSXML(java.lang.String rssUrl,
java.lang.String fileName)
rssUrl - URL / Path to the rss xmlfileName - Sugggest a filename with current datepublic static boolean saveSelectedNewsFeed()
public static java.lang.String suggestRSSFileName(java.lang.String initName)
initName - The initial name suggestion
private static boolean overwrite()
static void copyXML(java.lang.String url,
java.lang.String dest)
url - URL / Path to the rss xmldest - Path to the destinationfile
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||