code: public void ensureSpareCapacity(int n)
          throws IOException
      {
          // Do we have space?
          if (n>spareCapacity())
          {
              // No, then try flushing what we do have
              if (_pos>_start )
                  flush();
  
              ensureCapacity(n);
          }
      }
docs: /* ------------------------------------------------------------