cdx.scorebot.net.tests.webserver
Class GetFile

java.lang.Object
  extended by cdx.scorebot.net.tests.webserver.GetFile
All Implemented Interfaces:
java.io.Serializable

public class GetFile
extends java.lang.Object
implements java.io.Serializable

Helper class for downloading a file from a webserver

Author:
Sean Sullivan
See Also:
Serialized Form

Constructor Summary
GetFile(java.lang.String url)
          Initializes the class to connect to a specified url.
 
Method Summary
 java.lang.String getPage()
          Gets the HTML of the url.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GetFile

public GetFile(java.lang.String url)
        throws java.net.MalformedURLException,
               java.io.IOException
Initializes the class to connect to a specified url. Uses the getPage() function to actaully get the HTML

Parameters:
url - The url of the webpage to connect to
Throws:
java.net.MalformedURLException - Thrown if the url is not proper
java.io.IOException - Thrown if the class cannot access the webpage
Method Detail

getPage

public java.lang.String getPage()
                         throws java.io.IOException
Gets the HTML of the url.

Returns:
HTML of the specified webpage
Throws:
java.io.IOException