|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.antelmann.net.LocalWeb
public class LocalWeb
LocalWeb represents a website based on the local file system.
| Field Summary | |
|---|---|
static com.antelmann.net.LocalWeb.HTMLFileFilter |
htmlFilter
|
static com.antelmann.net.LocalWeb.ImageFileFilter |
imageFilter
|
| Constructor Summary | |
|---|---|
LocalWeb(File webDir,
File webRoot)
the webRoot must exist and be within the webDir |
|
| Method Summary | |
|---|---|
long |
calculateAccessibleWebSize()
|
File[] |
filesContainingLink(URL link)
|
File[] |
filesContainingLinks(URL[] link)
|
URL[] |
findBrokenLinks()
finds links to URLs that are not accessible |
File[] |
findBrokenLocalLinks()
finds links to local files that do not exist |
File[] |
findLinksTo(File file)
|
File[] |
findLocalLinksOutsideDir()
checks whether any linked local files are outside the web directory |
File[] |
findOrphans()
|
File[] |
getDataFiles()
|
String[] |
getFileTypes()
|
File[] |
getHTMLFiles()
|
File[] |
getImageFiles()
|
File[] |
getLinkedFiles()
returns a set of all files all files within this web that are accessible from the root |
File[] |
getLinkedFiles(File file)
returns a set of all files within this web that are accessible from the given file. |
MyFile |
getWebDir()
|
MyFile |
getWebRoot()
|
static File |
toFile(URL url)
returns the canonical file or null if the URL doesn't point to a valid file |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final com.antelmann.net.LocalWeb.HTMLFileFilter htmlFilter
public static final com.antelmann.net.LocalWeb.ImageFileFilter imageFilter
| Constructor Detail |
|---|
public LocalWeb(File webDir,
File webRoot)
throws IllegalArgumentException
IllegalArgumentException| Method Detail |
|---|
public MyFile getWebRoot()
public MyFile getWebDir()
public File[] getLinkedFiles()
throws IOException
IOException
public long calculateAccessibleWebSize()
throws IOException
IOException
public File[] findLocalLinksOutsideDir()
throws IOException
IOException
public File[] getLinkedFiles(File file)
throws IOException
IOExceptionpublic File[] getHTMLFiles()
public File[] getImageFiles()
public File[] getDataFiles()
public String[] getFileTypes()
public File[] findOrphans()
throws IOException
IOExceptionpublic File[] filesContainingLink(URL link)
public File[] filesContainingLinks(URL[] link)
public URL[] findBrokenLinks()
public File[] findBrokenLocalLinks()
public File[] findLinksTo(File file)
throws IOException
IOExceptionpublic static File toFile(URL url)
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||