public Reader createResource ( GeneratorContext context ) { InputStream is = createStreamResource ( context ) ; ReadableByteChannel chan = Channels . newChannel ( is ) ; return Channels . newReader ( chan , context . getCharset ( ) . newDecoder ( ) , - 1 ) ; }
Finds a resource from the classpath and returns a reader on it .