code: public long getLength()
    {
      StreamSource indirectSource = _indirectSource;
      
      if (indirectSource != null) {
        return indirectSource.getLength();
      }
      
      TempOutputStream out = _out;
      
      if (out != null) {
        return out.getLength();
      }
      else {
        return -1;
      }
    }
docs: Returns the length of the stream, if known.