Jochen Theodorou | 16 May 17:48

Re: [groovy-user] Property files in jar & ConfigSlurper

Tom Corcoran schrieb:
> Sounds promising. I'm not sure how to pipe the file into ConfigSlurper. I
> could do:
> 
> InputStream is = getClass().getResourceAsStream('properties/config.groovy')
> 
> but not sure how to get ConfigSlurper to read the InputStream
> 
> Or is there a better way?

there is a parse method that takes an URL. If you don't worry about the 
encoding, then you can use that. If not, then maybe you should read the 
script into a string and give that the parse method

bye blackdrag

--

-- 
Jochen "blackdrag" Theodorou
The Groovy Project Tech Lead (http://groovy.codehaus.org)
http://blackdragsview.blogspot.com/
http://www.g2one.com/

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

    http://xircles.codehaus.org/manage_email


Gmane