public long getLength() throws IOException { return raos.getLength(); }
public synchronized long getLength() throws IOException { // Anticipate if the file is to be expanded by the bytes awaiting in the buffer return Math.max(raos.getLength(), getOffset()); }
writeRandomData(raos, 100, 10); assert 100 == raos.getOffset(); assert 100 == raos.getLength(); assert 100 == tempFile.getSize(); assert 100 == raos.getLength(); assert 100 == tempFile.getSize(); assert 150 == raos.getLength(); assert 150 == tempFile.getSize(); assert 200 == raos.getLength(); assert 200 == tempFile.getSize(); assert 150 == raos.getOffset(); assert 100 == raos.getLength(); assert 100 == tempFile.getSize();