public boolean process() throws ResourceNotFoundException, ParseErrorException, Exception {
  data=null;
  InputStream is=null;
  errorCondition=null;
  try {
    is=resourceLoader.getResourceStream(name);
  }
 catch (  ResourceNotFoundException rnfe) {
    errorCondition=rnfe;
    throw rnfe;
  }
  if (is != null) {
    try {
      BufferedReader br=new BufferedReader(new InputStreamReader(is,encoding));
      data=rsvc.parse(br,name);
      initDocument();
      return true;
    }
 catch (    UnsupportedEncodingException uce) {
      String msg="Template.process : Unsupported input encoding : " + encoding + " for template "+ name;
      errorCondition=new ParseErrorException(msg);
      throw errorCondition;
    }
catch (    ParseException pex) {
      errorCondition=new ParseErrorException(pex.getMessage());
      throw errorCondition;
    }
catch (    Exception e) {
      errorCondition=e;
      throw e;
    }
 finally {
      is.close();
    }
  }
 else {
    errorCondition=new ResourceNotFoundException("Unknown resource error for resource " + name);
    throw errorCondition;
  }
}

public boolean process ( ) throws ResourceNotFoundException , ParseErrorException , Exception { data = null ; InputStream is = null ; errorCondition = null ; try { is = resourceLoader . getResourceStream ( name ) ; } catch ( ResourceNotFoundException rnfe ) { errorCondition = rnfe ; throw rnfe ; } if ( is != null ) { try { BufferedReader br = new BufferedReader ( new InputStreamReader ( is , encoding ) ) ; data = rsvc . parse ( br , name ) ; initDocument ( ) ; return true ; } catch ( UnsupportedEncodingException uce ) { String msg = "Template.process : Unsupported input encoding : " + encoding + " for template " + name ; errorCondition = new ParseErrorException ( msg ) ; throw errorCondition ; } catch ( ParseException pex ) { errorCondition = new ParseErrorException ( pex . getMessage ( ) ) ; throw errorCondition ; } catch ( Exception e ) { errorCondition = e ; throw e ; } finally { is . close ( ) ; } } else { errorCondition = new ResourceNotFoundException ( "Unknown resource error for resource " + name ) ; throw errorCondition ; } }
gets the named resource as a stream , parses and inits
