code: public void commit() throws IOException {
          if(!marked)     throw new IllegalStateException();
          marked = false;
          super.append(buffer);
          buffer.setLength(0);
      }
docs: Write the pending data.