Code example for InputStreamReader

Methods: close

0
      throws EvalError, IOException 
  { 
    final InputStream in = ObjectUtilities.getResourceRelativeAsStream
        ("BSHExpressionHeader.txt", BSHExpression.class); //$NON-NLS-1$ 
    // read the header, creates a skeleton 
    final Reader r = new InputStreamReader(new BufferedInputStream(in));
    try 
    { 
      interpreter.eval(r);
    } 
    finally 
    { 
      r.close();
    } 
 
    // now add the userdefined expression 
    // the expression is given in form of a function with the signature of: 
    // 
    // Object getValue () 
    // 
    if (getExpression() != null)