public class BlockSourceBzip2 extends Object implements BlockSource
| Modifier and Type | Field and Description |
|---|---|
protected com.google.common.cache.Cache<Long,Reference<Block>> |
blockCache |
static Pattern |
bwdMagicPattern |
static Pattern |
fwdMagicPattern |
static String |
magicStr |
protected SeekableSource |
seekableSource |
| Constructor and Description |
|---|
BlockSourceBzip2(SeekableSource seekableSource,
MatcherFactory fwdBlockStartMatcherFactory,
MatcherFactory bwdBlockStartMatcherFactory) |
| Modifier and Type | Method and Description |
|---|---|
Reference<Block> |
cache(long blockStart,
Seekable seekable) |
Reference<Block> |
contentAtOrAfter(long requestPos,
boolean inclusive) |
Reference<Block> |
contentAtOrBefore(long requestPos,
boolean inclusive) |
static BlockSource |
create(SeekableSource seekableSource) |
long |
getSizeOfBlock(long pos) |
boolean |
hasBlockAfter(long pos) |
boolean |
hasBlockBefore(long pos) |
protected Reference<Block> |
loadBlock(Seekable seekable) |
long |
size() |
public static final String magicStr
public static final Pattern fwdMagicPattern
public static final Pattern bwdMagicPattern
protected SeekableSource seekableSource
public BlockSourceBzip2(SeekableSource seekableSource, MatcherFactory fwdBlockStartMatcherFactory, MatcherFactory bwdBlockStartMatcherFactory)
public static BlockSource create(SeekableSource seekableSource)
protected Reference<Block> loadBlock(Seekable seekable) throws IOException
IOExceptionpublic Reference<Block> contentAtOrBefore(long requestPos, boolean inclusive) throws IOException
contentAtOrBefore in interface BlockSourceIOExceptionpublic Reference<Block> cache(long blockStart, Seekable seekable) throws IOException
IOExceptionpublic Reference<Block> contentAtOrAfter(long requestPos, boolean inclusive) throws IOException
contentAtOrAfter in interface BlockSourceIOExceptionpublic long getSizeOfBlock(long pos)
throws IOException
getSizeOfBlock in interface BlockSourceIOExceptionpublic boolean hasBlockAfter(long pos)
throws IOException
hasBlockAfter in interface BlockSourceIOExceptionpublic boolean hasBlockBefore(long pos)
throws IOException
hasBlockBefore in interface BlockSourceIOExceptionpublic long size()
throws IOException
size in interface BlockSourceIOExceptionCopyright © 2020. All rights reserved.