net.firstpartners.rp.back.extractor.util
Class Bookmarks

java.lang.Object
  extended by net.firstpartners.rp.back.extractor.util.Bookmarks

public class Bookmarks
extends java.lang.Object

Bookmarks reader for IE and Mozilla under windows, linux and unix

Version:
1.4
Author:
Firstpartners.net

Field Summary
static java.lang.String BOOKMARK_FILE
          Bookmark file
static java.lang.String BOOKMARK_URL
          Url boormark
private  java.io.FileFilter bookmarkFilter
          Bookmark filter
 java.lang.String IE_BOOKMARK
          IE bookmarks
static java.lang.String LINUX_MOZILLA_PATH
          Linux mozilla path
 java.lang.String MOZILLA_BOOKMARK
          Mozilla bookmarks
private  java.io.FileFilter urlFilter
          Url filder
static java.lang.String WIN_IE_PATH
          Favorites folder
static java.lang.String WIN_MOZILLA_PATH
          Windoss mozilla path
 
Constructor Summary
Bookmarks()
          Creates a new Bookmarks object.
 
Method Summary
 java.util.LinkedList getBookmarks()
          Get all the system bookmarks
private  java.lang.Object[] getDirectories(java.io.File path)
          Gets the sub directories of the input directory.
 java.util.LinkedList getIEBookmarkList(java.io.File pathName)
          Get the list of the IE - bookmarks!
private  java.lang.String getIEPropertyFromURLFiles(java.io.File file, java.lang.String param)
          Get the property from file
 java.util.LinkedList getMozillaBookmarkList(java.io.File pathName)
          Get the list of the Mozilla - bookmarks!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BOOKMARK_URL

public static final java.lang.String BOOKMARK_URL
Url boormark

See Also:
Constant Field Values

BOOKMARK_FILE

public static final java.lang.String BOOKMARK_FILE
Bookmark file

See Also:
Constant Field Values

WIN_IE_PATH

public static final java.lang.String WIN_IE_PATH
Favorites folder

See Also:
Constant Field Values

WIN_MOZILLA_PATH

public static final java.lang.String WIN_MOZILLA_PATH
Windoss mozilla path


LINUX_MOZILLA_PATH

public static final java.lang.String LINUX_MOZILLA_PATH
Linux mozilla path

See Also:
Constant Field Values

IE_BOOKMARK

public java.lang.String IE_BOOKMARK
IE bookmarks


MOZILLA_BOOKMARK

public java.lang.String MOZILLA_BOOKMARK
Mozilla bookmarks


urlFilter

private java.io.FileFilter urlFilter
Url filder


bookmarkFilter

private java.io.FileFilter bookmarkFilter
Bookmark filter

Constructor Detail

Bookmarks

public Bookmarks()
Creates a new Bookmarks object.

Method Detail

getIEBookmarkList

public java.util.LinkedList getIEBookmarkList(java.io.File pathName)
Get the list of the IE - bookmarks!

Parameters:
pathName - Path to the favorites folder
Returns:
List of the IE-bookmarks

getMozillaBookmarkList

public java.util.LinkedList getMozillaBookmarkList(java.io.File pathName)
Get the list of the Mozilla - bookmarks!

Parameters:
pathName - Path to the parrent of bookmarks file
Returns:
List of the Mozilla-bookmarks

getIEPropertyFromURLFiles

private java.lang.String getIEPropertyFromURLFiles(java.io.File file,
                                                   java.lang.String param)
                                            throws java.io.IOException,
                                                   java.io.FileNotFoundException
Get the property from file

Parameters:
file - Property file
param - Requested parameter
Returns:
Property from url file
Throws:
java.io.IOException - Exception occur in the communications
java.io.FileNotFoundException

getDirectories

private java.lang.Object[] getDirectories(java.io.File path)
Gets the sub directories of the input directory.

Parameters:
path - the directory to retreive sub directories from.
Returns:
array of sub directories. The array is of type Object[], however each element of the array may be casted to a File object.

getBookmarks

public java.util.LinkedList getBookmarks()
Get all the system bookmarks

Returns:
List with all the links for the system bookmarks (win/lixnux)