/** Writes a single byte. * @see IndexInput#readByte() */ public void writeByte(byte b) throws IOException { if (bufferPosition >= BUFFER_SIZE) flush(); buffer[bufferPosition++] = b; }
/** Sets current position in this file, where the next write will occur. * @see #getFilePointer() */ public void seek(long pos) throws IOException { flush(); bufferStart = pos; }
/** Writes a single byte. * @see IndexInput#readByte() */ public void writeByte(byte b) throws IOException { if (bufferPosition >= BUFFER_SIZE) flush(); buffer[bufferPosition++] = b; }
@Override public void close() throws IOException { flush(); }
@Override public void seek(long pos) throws IOException { flush(); bufferStart = pos; }
@Override public void writeByte(byte b) throws IOException { if (bufferPosition >= bufferSize) flush(); buffer[bufferPosition++] = b; }
/** Sets current position in this file, where the next write will occur. * @see #getFilePointer() */ public void seek(long pos) throws IOException { flush(); bufferStart = pos; }
/** Closes this stream to further operations. */ public void close() throws IOException { flush(); }
/** Closes this stream to further operations. */ public void close() throws IOException { flush(); }
@Override public void flush() throws IOException { try { super.flush(); } finally { delegate.flush(); } }