public class ApacheURLLister
extends java.lang.Object
Constructor and Description |
---|
ApacheURLLister() |
Modifier and Type | Method and Description |
---|---|
java.util.List |
listAll(java.net.URL url)
Returns a list of sub urls of the given url.
|
java.util.List |
listDirectories(java.net.URL url)
Returns a list of sub 'directories' of the given url.
|
java.util.List |
listFiles(java.net.URL url)
Returns a list of sub 'files' (in opposition to directories) of the given url.
|
java.util.List |
retrieveListing(java.net.URL url,
boolean includeFiles,
boolean includeDirectories)
Retrieves a
List of URL s corresponding to the files and/or directories found
at the supplied base URL. |
public java.util.List listAll(java.net.URL url) throws java.io.IOException
url
- The base URL from which to retrieve the listing.java.io.IOException
- If an error occures retrieving the HTML.public java.util.List listDirectories(java.net.URL url) throws java.io.IOException
url
- The base URL from which to retrieve the listing.java.io.IOException
- If an error occures retrieving the HTML.public java.util.List listFiles(java.net.URL url) throws java.io.IOException
url
- The base URL from which to retrieve the listing.java.io.IOException
- If an error occures retrieving the HTML.public java.util.List retrieveListing(java.net.URL url, boolean includeFiles, boolean includeDirectories) throws java.io.IOException
List
of URL
s corresponding to the files and/or directories found
at the supplied base URL.url
- The base URL from which to retrieve the listing.includeFiles
- If true include files in the returned list.includeDirectories
- If true include directories in the returned list.List
of URL
s.java.io.IOException
- If an error occures retrieving the HTML.