private void refreshBuffer() throws IOException {
  if (output == null) {
    throw new OutOfSpaceException();
  }
  output.write(buffer,0,position);
  position=0;
}

private void refreshBuffer ( ) throws IOException { if ( output == null ) { throw new OutOfSpaceException ( ) ; } output . write ( buffer , 0 , position ) ; position = 0 ; }
internal helper that writes the current buffer to the output . the buffer position is reset to its initial value when this returns .
