/** Resets this to an empty file. */ public void reset() { currentBuffer = null; currentBufferIndex = -1; bufferPosition = 0; bufferStart = 0; bufferLength = 0; file.setLength(0); }
private void setFileLength() { long pointer = bufferStart + bufferPosition; if (pointer > file.length) { file.setLength(pointer); } }