public void load(FileLocation loc,String defaultEnc) throws IOException {
  this.loc=loc;
  if (loc.isLocal() && !loc.isLocalAndExists()) {
    this.charSet=defaultEnc != null ? defaultEnc : getDefaultEncoding();
    return;
  }
  UnicodeReader ur=new UnicodeReader(loc.getInputStream(),defaultEnc);
  charSet=ur.getEncoding();
  Document doc=getDocument();
  doc.removeDocumentListener(this);
  BufferedReader r=new BufferedReader(ur);
  try {
    read(r,null);
  }
  finally {
    doc.addDocumentListener(this);
    r.close();
  }
}

public void load ( FileLocation loc , String defaultEnc ) throws IOException { this . loc = loc ; if ( loc . isLocal ( ) && ! loc . isLocalAndExists ( ) ) { this . charSet = defaultEnc != null ? defaultEnc : getDefaultEncoding ( ) ; return ; } UnicodeReader ur = new UnicodeReader ( loc . getInputStream ( ) , defaultEnc ) ; charSet = ur . getEncoding ( ) ; Document doc = getDocument ( ) ; doc . removeDocumentListener ( this ) ; BufferedReader r = new BufferedReader ( ur ) ; try { read ( r , null ) ; } finally { doc . addDocumentListener ( this ) ; r . close ( ) ; } }
loads the specified file in this editor .
