|
|||||||||||
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
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 | |
static boolean |
copyManifestFiles(String toPath)
Copys java.exe.manifest and javaw.exe.manifest to the java.home/bin/ directory, if not yet copyd. |
(package private) static void |
copyXML(String url,
String dest)
Copy a XML to another file |
static boolean |
exists(String path)
Check if the given Path points to an existing file. |
static void |
exportCategory(org.eclipse.swt.widgets.Shell parent,
String name,
String[] format)
Open a FileDialog for the user to choose where to export the XML holding the category(s). |
static boolean |
exportUserSettings(org.eclipse.swt.widgets.Shell parent)
Open a FileDialog for the user to choose where to export the "user.xml" |
static String |
getContent(InputStream inS)
Read the contents from an InputStream into a String. |
static String |
getContent(URL url)
Read the contents from an URL into a String. |
static String |
getFilePath(org.eclipse.swt.widgets.Shell parent,
String[] formats,
String fileName,
int style,
String path)
Get a path to a file from the user |
static String |
getFilePath(String[] formats,
String fileName,
int style,
String path)
Get a path to a file from the user |
static String |
getSavePath(String fileName,
String format)
Get the FilePath from the user to save the file |
static int |
importUserSettings(org.eclipse.swt.widgets.Shell parent)
Open a FileDialog for the user to choose from which file the settings should be imported |
static boolean |
isMediumWriteable(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(String rssUrl,
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 String |
suggestRSSFileName(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 |
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 copyManifestFiles(String toPath)
toPath
- Path to copy to
public static boolean exists(String path)
path
- The path to check.
public static void exportCategory(org.eclipse.swt.widgets.Shell parent, String name, String[] format) throws IOException
parent
- The parent Shell of the Dialogname
- Suggested name for the fileformat
- Preselected formats
IOException
- If an IO Error occurspublic static boolean exportUserSettings(org.eclipse.swt.widgets.Shell parent) throws IOException
parent
- The parent Shell of the Dialog
IOException
- If an IO Error occurspublic static String getContent(InputStream inS)
inS
- Any InputStream (e.g. from an URL)
public static String getContent(URL url) throws IOException
url
- Any valid URL that is online
IOException
- If an error occurspublic static String getFilePath(org.eclipse.swt.widgets.Shell parent, String[] formats, String fileName, int style, String path)
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 directory
public static String getFilePath(String[] formats, String fileName, int style, String path)
formats
- List of selectable file extensionsfileName
- The preselected filename for the dialogstyle
- Either SWT.OPEN or SWT.SAVEpath
- If not NULL browser into given directory
public static String getSavePath(String fileName, String format)
fileName
- Preselected filenameformat
- Format of the file to save
public static int importUserSettings(org.eclipse.swt.widgets.Shell parent) throws IOException
parent
- The parent Shell of the Dialog
IOException
- If an IO Error occurspublic static boolean isMediumWriteable(File file)
file
- A file to write
public static void saveRSSXML(String rssUrl, String fileName)
rssUrl
- URL / Path to the rss xmlfileName
- Sugggest a filename with current datepublic static boolean saveSelectedNewsFeed()
public static String suggestRSSFileName(String initName)
initName
- The initial name suggestion
private static boolean overwrite()
static void copyXML(String url, 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 |