org.apache.hadoop.hdfs
Class ByteRangeInputStream.URLOpener

java.lang.Object
  extended by org.apache.hadoop.hdfs.ByteRangeInputStream.URLOpener
Enclosing class:
ByteRangeInputStream

public abstract static class ByteRangeInputStream.URLOpener
extends Object

This class wraps a URL and provides method to open connection. It can be overridden to change how a connection is opened.


Field Summary
protected  URL url
           
 
Constructor Summary
ByteRangeInputStream.URLOpener(URL u)
           
 
Method Summary
protected abstract  HttpURLConnection connect(long offset, boolean resolved)
          Connect to server with a data offset.
 URL getURL()
           
 void setURL(URL u)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

url

protected URL url
Constructor Detail

ByteRangeInputStream.URLOpener

public ByteRangeInputStream.URLOpener(URL u)
Method Detail

setURL

public void setURL(URL u)

getURL

public URL getURL()

connect

protected abstract HttpURLConnection connect(long offset,
                                             boolean resolved)
                                      throws IOException
Connect to server with a data offset.

Throws:
IOException


Copyright © 2012 Apache Software Foundation. All Rights Reserved.