Java Mailing List Archive

http://www.gg3721.com/

Home » user.groovy »

[groovy-user] Groovier Way of Getting Resource Stream?

James Hughes

2008-08-07

Replies: Find Java Web Hosting

Author LoginPost Reply
Hi,

Is there a "groovier" way of doing this....

def file = new BufferedReader(new InputStreamReader(getClass().getResourceAsStream("date.js")));

The js file is in the same directory as the class file and the function I am calling is expecting a bufferedreader?

Can this be shortened in anyway?

James



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email


©2008 gg3721.com - Jax Systems, LLC, U.S.A.