code: public synchronized void setFilename(String filename)
      {
          if (filename!=null)
          {
              filename=filename.trim();
              if (filename.length()==0)
                  filename=null;
          }
          
          if (isStarted() && _filename!=null && filename==null)
              _out=null;
          
          _reopen=isStarted() &&
              ((_filename==null && filename!=null)||
               (_filename!=null && !_filename.equals(filename)));
          _filename=filename;
  
          if (!isStarted() && _filename!=null)
              _out=null;
      }
docs: /* ------------------------------------------------------------