Package htsjdk.tribble.util
Class RemoteURLHelper
- java.lang.Object
-
- htsjdk.tribble.util.RemoteURLHelper
-
-
Constructor Summary
Constructors Constructor Description RemoteURLHelper(URL url)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
exists()
long
getContentLength()
URL
getUrl()
InputStream
openInputStream()
Open an InputStream to stream the contents of the resourceInputStream
openInputStreamForRange(long start, long end)
Open an InputStream to stream a slice (range) of the resource.
-
-
-
Constructor Detail
-
RemoteURLHelper
public RemoteURLHelper(URL url)
-
-
Method Detail
-
getUrl
public URL getUrl()
-
getContentLength
public long getContentLength() throws IOException
- Specified by:
getContentLength
in interfaceURLHelper
- Returns:
- content length of the resource, or -1 if not available
- Throws:
IOException
-
openInputStream
public InputStream openInputStream() throws IOException
Description copied from interface:URLHelper
Open an InputStream to stream the contents of the resource- Specified by:
openInputStream
in interfaceURLHelper
- Returns:
- Throws:
IOException
-
openInputStreamForRange
public InputStream openInputStreamForRange(long start, long end) throws IOException
Description copied from interface:URLHelper
Open an InputStream to stream a slice (range) of the resource. May throw an OperationUnsupportedException- Specified by:
openInputStreamForRange
in interfaceURLHelper
- Returns:
- Throws:
IOException
-
exists
public boolean exists() throws IOException
- Specified by:
exists
in interfaceURLHelper
- Throws:
IOException
-
-