private void writeIfBlockFull() throws IOException { if (bufferInUse() >= syncInterval) writeBlock(); }
private void writeIfBlockFull() throws IOException { if (bufferInUse() >= syncInterval) writeBlock(); }
/** Append a datum to the file. * @see AppendWriteException */ public void append(D datum) throws IOException { assertOpen(); int usedBuffer = bufferInUse(); try { dout.write(datum, bufOut); } catch (IOException e) { resetBufferTo(usedBuffer); throw new AppendWriteException(e); } catch (RuntimeException re) { resetBufferTo(usedBuffer); throw new AppendWriteException(re); } blockCount++; writeIfBlockFull(); }
/** Append a datum to the file. * @see AppendWriteException */ public void append(D datum) throws IOException { assertOpen(); int usedBuffer = bufferInUse(); try { dout.write(datum, bufOut); } catch (IOException e) { resetBufferTo(usedBuffer); throw new AppendWriteException(e); } catch (RuntimeException re) { resetBufferTo(usedBuffer); throw new AppendWriteException(re); } blockCount++; writeIfBlockFull(); }
private void writeIfBlockFull() throws IOException { if (bufferInUse() >= syncInterval) writeBlock(); }
private void writeIfBlockFull() throws IOException { if (bufferInUse() >= syncInterval) writeBlock(); }
/** Append a datum to the file. * @see AppendWriteException */ public void append(D datum) throws IOException { assertOpen(); int usedBuffer = bufferInUse(); try { dout.write(datum, bufOut); } catch (IOException e) { resetBufferTo(usedBuffer); throw new AppendWriteException(e); } catch (RuntimeException re) { resetBufferTo(usedBuffer); throw new AppendWriteException(re); } blockCount++; writeIfBlockFull(); }
/** Append a datum to the file. * @see AppendWriteException */ public void append(D datum) throws IOException { assertOpen(); int usedBuffer = bufferInUse(); try { dout.write(datum, bufOut); } catch (IOException e) { resetBufferTo(usedBuffer); throw new AppendWriteException(e); } catch (RuntimeException re) { resetBufferTo(usedBuffer); throw new AppendWriteException(re); } blockCount++; writeIfBlockFull(); }