|
|
@ -153,7 +153,7 @@ public abstract class BlockSource implements AutoCloseable { |
|
|
|
* @param blockSize |
|
|
|
* @param blockSize |
|
|
|
* size to read. |
|
|
|
* size to read. |
|
|
|
* @return buffer containing the block content. |
|
|
|
* @return buffer containing the block content. |
|
|
|
* @throws IOException |
|
|
|
* @throws java.io.IOException |
|
|
|
* if block cannot be read. |
|
|
|
* if block cannot be read. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public abstract ByteBuffer read(long position, int blockSize) |
|
|
|
public abstract ByteBuffer read(long position, int blockSize) |
|
|
@ -163,7 +163,7 @@ public abstract class BlockSource implements AutoCloseable { |
|
|
|
* Determine the size of the file. |
|
|
|
* Determine the size of the file. |
|
|
|
* |
|
|
|
* |
|
|
|
* @return total number of bytes in the file. |
|
|
|
* @return total number of bytes in the file. |
|
|
|
* @throws IOException |
|
|
|
* @throws java.io.IOException |
|
|
|
* if size cannot be obtained. |
|
|
|
* if size cannot be obtained. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public abstract long size() throws IOException; |
|
|
|
public abstract long size() throws IOException; |
|
|
@ -180,6 +180,7 @@ public abstract class BlockSource implements AutoCloseable { |
|
|
|
// Do nothing by default.
|
|
|
|
// Do nothing by default.
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** {@inheritDoc} */ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public abstract void close(); |
|
|
|
public abstract void close(); |
|
|
|
} |
|
|
|
} |
|
|
|