} finally{ FileSystem.close(isr); FileSystem.close(in);
    public String loadResourceToString(String resourcename, Charset encoding) throws SmartFrogException, RemoteException {        InputStream in= loadResource(resourcename);        InputStreamReader isr = null;        try {            isr=new InputStreamReader(in,encoding);            StringBuffer buffer=new StringBuffer();            int ch;            while((ch=isr.read())>=0) {                buffer.append((char)ch);            }            return buffer.toString();        } catch(IOException ioe) {            throw SmartFrogException.forward("when reading "+resourcename,ioe);        } finally{            FileSystem.close(isr);            FileSystem.close(in);        }    }