Class WebPageReader

java.lang.Object
  extended by WebPageReader

public class WebPageReader
extends Object


Constructor Summary
WebPageReader(String s)
          Constructor that takes a url as a string
 
Method Summary
 String getType()
          The type of the material at the other end of the URL is the contentType from the URLConnection
 String nextLine()
          Next line gets the next line from the material at the other end of the URL.
 boolean readyToRead()
          A WebPageReader is ready to read if the stream is ready
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebPageReader

public WebPageReader(String s)
Constructor that takes a url as a string

Parameters:
s - the url as a string
Method Detail

readyToRead

public boolean readyToRead()
A WebPageReader is ready to read if the stream is ready

Returns:
true if the stream is ready, else false

getType

public String getType()
The type of the material at the other end of the URL is the contentType from the URLConnection

Returns:
a string with the content type

nextLine

public String nextLine()
Next line gets the next line from the material at the other end of the URL. We read it like a file. There is more material there as long as readyToRead() returns true. We may also read a null when it's done.

Returns:
the next line from the url or null if done