@Test public void getBlockSize() throws IOException { mBlockMeta = new BlockMeta(mTempBlockMeta); Assert.assertEquals(0, mBlockMeta.getBlockSize()); byte[] buf = BufferUtils.getIncreasingByteArray((int) TEST_BLOCK_SIZE - 1); BufferUtils.writeBufferToFile(mTempBlockMeta.getCommitPath(), buf); mBlockMeta = new BlockMeta(mTempBlockMeta); Assert.assertEquals(TEST_BLOCK_SIZE - 1, mBlockMeta.getBlockSize()); buf = BufferUtils.getIncreasingByteArray((int) TEST_BLOCK_SIZE); BufferUtils.writeBufferToFile(mTempBlockMeta.getCommitPath(), buf); mBlockMeta = new BlockMeta(mTempBlockMeta); Assert.assertEquals(TEST_BLOCK_SIZE, mBlockMeta.getBlockSize()); }
@Override public long getBlockSize() { return mBlockSize; }
BlockMeta extends AbstractBlockMeta { @Override public long getBlockSize() { return mBlockSize; } }
BlockMeta extends AbstractBlockMeta { @Override public long getBlockSize() { return mBlockSize; } BlockMeta(long blockId, long blockSize, StorageDir dir);  BlockMeta(TempBlockMeta tempBlock); }
BlockMeta extends AbstractBlockMeta { @Override public long getBlockSize() { return mBlockSize; } BlockMeta(long blockId, long blockSize, StorageDir dir);  BlockMeta(TempBlockMeta tempBlock); @Override long getBlockSize(); @Override String getPath(); }
BlockMeta extends AbstractBlockMeta { @Override public long getBlockSize() { return mBlockSize; } BlockMeta(long blockId, long blockSize, StorageDir dir);  BlockMeta(TempBlockMeta tempBlock); @Override long getBlockSize(); @Override String getPath();  }