public class ZiplinedBlock extends Object
Modifier and Type | Field and Description |
---|---|
static int |
BLOCK_SIZE |
static String |
BYTES_HEADER |
static String |
BYTES_MINUS |
static String |
RANGE_HEADER |
Constructor and Description |
---|
ZiplinedBlock(String[] urlOrPaths,
long offset) |
ZiplinedBlock(String[] urlOrPaths,
long offset,
int count) |
Modifier and Type | Method and Description |
---|---|
protected byte[] |
attemptBlockLoad(BlockLoader remote) |
BufferedReader |
readBlock() |
protected BufferedReader |
readBlockEfficiently(BlockLoader remote) |
protected BufferedReader |
readBlockInefficiently() |
void |
setLoader(BlockLoader loader) |
public static final int BLOCK_SIZE
public static final String RANGE_HEADER
public static final String BYTES_HEADER
public static final String BYTES_MINUS
public ZiplinedBlock(String[] urlOrPaths, long offset)
urlOrPaths
- Array of URLs where this file can be downloaded.offset
- start of 128K block boundary.public ZiplinedBlock(String[] urlOrPaths, long offset, int count)
urlOrPaths
- Array of URLs where this file can be downloaded.offset
- start of 128K block boundary.count
- number of records in this blockpublic void setLoader(BlockLoader loader)
loader
- the RemoteHttp11BlockLoader to use when fetching this blockpublic BufferedReader readBlock() throws IOException
IOException
- for usual reasonsprotected byte[] attemptBlockLoad(BlockLoader remote)
protected BufferedReader readBlockEfficiently(BlockLoader remote) throws IOException
IOException
protected BufferedReader readBlockInefficiently() throws IOException
IOException
Copyright © 2005–2015 IIPC. All rights reserved.