velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <>
Subject Re: why no StringBufferResourceLoader ?
Date Mon, 08 Apr 2002 18:08:21 GMT
On 4/7/02 10:38 PM, "Stephen Riek" <> wrote:

> I'm intrigued. Velocity supports a FileResourceLoader,
> DataSourceResourceLoader, ClasspathResourceLoader and even JarResourceLoader
> but why is there no mechanism for using a simple String or StringBuffer
> object. I would have thought it most useful and convenient, but presume that
> there is a design reason for not including it ?

Making a formal loader for a StringBuffer doesn't make too much sense, as
the concept of a loader is such that it *loads* template from a source.

However, the application API supports you supplying a String, InputStream or
Reader as the source of the template, which I think is what you are looking

See the evaluate() methods in class (if you
are using the singleton model) or (if you are using
the 'separate instance' model.)


Geir Magnusson Jr.             
System and Software Consulting
You're going to end up getting pissed at your software
anyway, so you might as well not pay for it. Try Open Source.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message