|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.myjavaworld.jftp.FavoritesManager
public class FavoritesManager
A Class used to serialize/deserialize favourite FTP sites. This is the central point that contains all the IO logic required to retrieve/store/add/edit/delete favouritre FTP sites.
| Constructor Summary | |
|---|---|
FavoritesManager()
|
|
| Method Summary | |
|---|---|
static void |
addFavorite(RemoteHost host)
Adds the given favourite to the list of previously stored favorites and saves them back to the favorites file. |
static List |
getFavorites()
Returns the list of favourite FTP sites. |
static void |
saveFavorites(List favorites)
Saves the given list of favourite FTP sites to the favorite file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FavoritesManager()
| Method Detail |
|---|
public static List getFavorites()
throws IOException,
ClassNotFoundException,
IllegalBlockSizeException,
BadPaddingException
FAV_FILE.
IOException - if an IO error occurs while reading the file
ClassNotFoundException - We should never get this exception. If we get this, it
means that the software is not installed correctly.
IllegalBlockSizeException
BadPaddingException
public static void saveFavorites(List favorites)
throws IOException,
IllegalBlockSizeException
favorites - List of favorites to be searialized
IOException - if an IO error occurs
IllegalBlockSizeException
public static void addFavorite(RemoteHost host)
throws IOException,
ClassNotFoundException,
IllegalBlockSizeException,
BadPaddingException
host - Favorite FTP site
IOException - if an IO error occurs
ClassNotFoundException
IllegalBlockSizeException
BadPaddingException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||