* @throws BlockInfoException
*/
public synchronized void setLength(long length) throws SuspectedFileSizeException,
BlockInfoException {
if (isComplete()) {
throw new SuspectedFileSizeException("InodeFile length was set previously.");
}
if (length < 0) {
throw new SuspectedFileSizeException("InodeFile new length " + length + " is illegal.");
}
mLength = 0;
while (length >= mBlockSizeByte) {
addBlock(new BlockInfo(this, mBlocks.size(), mBlockSizeByte));
length -= mBlockSizeByte;