anvil.parser
Class URLInputSource

java.lang.Object
  |
  +--anvil.parser.URLInputSource
All Implemented Interfaces:
InputSource
Direct Known Subclasses:
URLContainer.URLResource

public class URLInputSource
extends java.lang.Object
implements InputSource

class URLInputSource


Field Summary
protected  java.net.URLConnection _connection
           
protected  java.io.InputStream _input
           
protected  long _lastModified
           
protected  java.net.URL _url
           
 
Constructor Summary
URLInputSource(java.net.URL url)
           
URLInputSource(java.net.URLConnection connection)
           
 
Method Summary
 void close()
           
 java.nio.charset.Charset getCharacterEncoding()
           
 java.io.InputStream getInputStream()
           
 long getLastModified()
           
 int getLength()
           
 java.net.URL getURL()
           
 java.nio.ByteBuffer load()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_url

protected java.net.URL _url

_connection

protected java.net.URLConnection _connection

_input

protected java.io.InputStream _input

_lastModified

protected long _lastModified
Constructor Detail

URLInputSource

public URLInputSource(java.net.URL url)
               throws java.io.IOException

URLInputSource

public URLInputSource(java.net.URLConnection connection)
Method Detail

getURL

public java.net.URL getURL()
Specified by:
getURL in interface InputSource

getLastModified

public long getLastModified()
Specified by:
getLastModified in interface InputSource

getLength

public int getLength()
Specified by:
getLength in interface InputSource

getCharacterEncoding

public java.nio.charset.Charset getCharacterEncoding()
Specified by:
getCharacterEncoding in interface InputSource

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Specified by:
getInputStream in interface InputSource
java.io.IOException

load

public java.nio.ByteBuffer load()
                         throws java.io.IOException
Specified by:
load in interface InputSource
java.io.IOException

close

public void close()
           throws java.io.IOException
Specified by:
close in interface InputSource
java.io.IOException