org.browsecode.helpers.html
Class WebpageToString
java.lang.Object
org.browsecode.helpers.html.WebpageToString
public class WebpageToString
- extends java.lang.Object
Known bug: do not use very long userID/password for authentication. If you have a very long one (more than ?15? characters, about), Java's webpage authentication stuff will throw a crypitic exception. (Note that, by tests, these long strings work in Safari, curl, etc., so it's clearly a Java bug).
Method Summary |
java.lang.Exception |
getLastError()
|
java.lang.String |
getLastPage()
|
java.lang.String |
getPage(java.lang.String urlString)
|
java.lang.String |
getPage(java.lang.String userID,
java.lang.String password,
java.lang.String urlString)
|
java.lang.String |
getPage(java.lang.String userID,
java.lang.String password,
java.net.URL url)
|
boolean |
isWebpageRunning(java.lang.String userID,
java.lang.String password,
java.net.URL url,
java.lang.String textThatMustBeInWebpage)
|
boolean |
isWebpageRunning(java.lang.String userID,
java.lang.String password,
java.net.URL url,
java.lang.String[] textThatMustBeInWebpage)
|
boolean |
isWebpageRunning(java.lang.String userID,
java.lang.String password,
java.net.URL url,
java.util.Vector<java.lang.String> textThatMustBeInWebpage)
|
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WebpageToString
public WebpageToString()
getLastError
public java.lang.Exception getLastError()
getLastPage
public java.lang.String getLastPage()
getPage
public java.lang.String getPage(java.lang.String urlString)
throws java.net.MalformedURLException,
java.io.IOException
- Throws:
java.net.MalformedURLException
java.io.IOException
getPage
public java.lang.String getPage(java.lang.String userID,
java.lang.String password,
java.net.URL url)
throws java.net.MalformedURLException,
java.io.IOException
- Throws:
java.net.MalformedURLException
java.io.IOException
getPage
public java.lang.String getPage(java.lang.String userID,
java.lang.String password,
java.lang.String urlString)
throws java.net.MalformedURLException,
java.io.IOException
- Throws:
java.net.MalformedURLException
java.io.IOException
isWebpageRunning
public boolean isWebpageRunning(java.lang.String userID,
java.lang.String password,
java.net.URL url,
java.lang.String[] textThatMustBeInWebpage)
isWebpageRunning
public boolean isWebpageRunning(java.lang.String userID,
java.lang.String password,
java.net.URL url,
java.lang.String textThatMustBeInWebpage)
isWebpageRunning
public boolean isWebpageRunning(java.lang.String userID,
java.lang.String password,
java.net.URL url,
java.util.Vector<java.lang.String> textThatMustBeInWebpage)
main
public static final void main(java.lang.String[] args)