/** 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(); }
/** 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(); }
@Override public String getName() { if(!fail) { fail = true; return super.getName(); } throw new DataFileWriter.AppendWriteException(null); } });
@Override public String getName() { throw new DataFileWriter.AppendWriteException(null); } });