org.millscript.millscript
Class URLSource

java.lang.Object
  extended by org.millscript.millscript.Source
      extended by org.millscript.millscript.URLSource

public class URLSource
extends Source

This class represents a URL as a source of information.


Constructor Summary
URLSource(java.net.URL u)
          Constructs a new URL source for the specified URL.
 
Method Summary
 java.io.InputStream getInputStream()
          Returns an InputStream to read bytes from this source.
 java.lang.String getOrigin()
          Returns this sources origin.
 java.net.URL getOriginURL()
          Returns a URL for the sources origin.
 
Methods inherited from class org.millscript.millscript.Source
getReader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URLSource

public URLSource(java.net.URL u)
Constructs a new URL source for the specified URL.

Parameters:
u - the source URL
Method Detail

getInputStream

public final java.io.InputStream getInputStream()
Description copied from class: Source
Returns an InputStream to read bytes from this source.

Specified by:
getInputStream in class Source
Returns:
an InputStream to read bytes from this source.
See Also:
Source.getInputStream()

getOrigin

public final java.lang.String getOrigin()
Description copied from class: Source
Returns this sources origin.

Specified by:
getOrigin in class Source
Returns:
a String containing this origins source
See Also:
Source.getOrigin()

getOriginURL

public java.net.URL getOriginURL()
Description copied from class: Source
Returns a URL for the sources origin.

Specified by:
getOriginURL in class Source
Returns:
a URL for this sources origin.
See Also:
Source.getOriginURL()


Copyright © 2001-2007 Open World Ltd. All Rights Reserved.