@Test public void canReadAcrossBlocks() throws IOException { BlockConsumingInputStream stream = BlockConsumingInputStream.create(threeByteConsumer, 2, 1); expectNextBytesFromStream(stream, "di"); expectNextBytesFromStream(stream, "vi"); expectNextBytesFromStream(stream, "si"); }
public static BlockConsumingInputStream create( BlockGetter blockGetter, long numBlocks, int blocksInMemory) throws IOException { ensureExpectedArraySizeDoesNotOverflow(blockGetter, blocksInMemory); return new BlockConsumingInputStream(blockGetter, numBlocks, blocksInMemory); }
BlockConsumingInputStream extends InputStream { public static BlockConsumingInputStream create( BlockGetter blockGetter, long numBlocks, int blocksInMemory) throws IOException { ensureExpectedArraySizeDoesNotOverflow(blockGetter, blocksInMemory); return new BlockConsumingInputStream(blockGetter, numBlocks, blocksInMemory); } }
BlockConsumingInputStream extends InputStream { public static BlockConsumingInputStream create( BlockGetter blockGetter, long numBlocks, int blocksInMemory) throws IOException { ensureExpectedArraySizeDoesNotOverflow(blockGetter, blocksInMemory); return new BlockConsumingInputStream(blockGetter, numBlocks, blocksInMemory); } private  BlockConsumingInputStream(BlockGetter blockGetter, long numBlocks, int blocksInMemory); }
BlockConsumingInputStream extends InputStream { public static BlockConsumingInputStream create( BlockGetter blockGetter, long numBlocks, int blocksInMemory) throws IOException { ensureExpectedArraySizeDoesNotOverflow(blockGetter, blocksInMemory); return new BlockConsumingInputStream(blockGetter, numBlocks, blocksInMemory); } private  BlockConsumingInputStream(BlockGetter blockGetter, long numBlocks, int blocksInMemory); static BlockConsumingInputStream create(
            BlockGetter blockGetter,
            long numBlocks,
            int blocksInMemory); @Override int read(); @Override int read(byte[] bytes, int off, int len); }
BlockConsumingInputStream extends InputStream { public static BlockConsumingInputStream create( BlockGetter blockGetter, long numBlocks, int blocksInMemory) throws IOException { ensureExpectedArraySizeDoesNotOverflow(blockGetter, blocksInMemory); return new BlockConsumingInputStream(blockGetter, numBlocks, blocksInMemory); } private  BlockConsumingInputStream(BlockGetter blockGetter, long numBlocks, int blocksInMemory); static BlockConsumingInputStream create(
            BlockGetter blockGetter,
            long numBlocks,
            int blocksInMemory); @Override int read(); @Override int read(byte[] bytes, int off, int len);  }