public abstract class ByteRangeInputStream extends FSInputStream
限定符和类型 | 类和说明 |
---|---|
static class |
ByteRangeInputStream.URLOpener
This class wraps a URL and provides method to open connection.
|
限定符和类型 | 字段和说明 |
---|---|
protected long |
currentPos |
protected Long |
fileLength |
protected InputStream |
in |
protected ByteRangeInputStream.URLOpener |
originalURL |
protected ByteRangeInputStream.URLOpener |
resolvedURL |
protected long |
startPos |
构造器和说明 |
---|
ByteRangeInputStream(ByteRangeInputStream.URLOpener o,
ByteRangeInputStream.URLOpener r)
Create with the specified URLOpeners.
|
限定符和类型 | 方法和说明 |
---|---|
void |
close() |
protected InputStream |
getInputStream() |
long |
getPos()
Return the current offset from the start of the file
|
protected abstract URL |
getResolvedUrl(HttpURLConnection connection) |
protected InputStream |
openInputStream() |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
void |
seek(long pos)
Seek to the given offset from the start of the file.
|
boolean |
seekToNewSource(long targetPos)
Seeks a different copy of the data.
|
read, readFully, readFully
available, mark, markSupported, read, reset, skip
protected InputStream in
protected ByteRangeInputStream.URLOpener originalURL
protected ByteRangeInputStream.URLOpener resolvedURL
protected long startPos
protected long currentPos
protected Long fileLength
public ByteRangeInputStream(ByteRangeInputStream.URLOpener o, ByteRangeInputStream.URLOpener r)
o
- Original urlr
- Resolved urlprotected abstract URL getResolvedUrl(HttpURLConnection connection) throws IOException
IOException
protected InputStream getInputStream() throws IOException
IOException
protected InputStream openInputStream() throws IOException
IOException
public int read() throws IOException
read
在类中 InputStream
IOException
public int read(byte[] b, int off, int len) throws IOException
read
在类中 InputStream
IOException
public void seek(long pos) throws IOException
seek
在接口中 Seekable
seek
在类中 FSInputStream
IOException
public long getPos() throws IOException
getPos
在接口中 Seekable
getPos
在类中 FSInputStream
IOException
public boolean seekToNewSource(long targetPos) throws IOException
seekToNewSource
在接口中 Seekable
seekToNewSource
在类中 FSInputStream
IOException
public void close() throws IOException
close
在接口中 Closeable
close
在接口中 AutoCloseable
close
在类中 InputStream
IOException
Copyright © 2009 The Apache Software Foundation