You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by dl...@apache.org on 2002/10/10 19:28:12 UTC

cvs commit: jakarta-velocity/src/java/org/apache/velocity/runtime/resource ContentResource.java

dlr         2002/10/10 10:28:12

  Modified:    src/java/org/apache/velocity/runtime/resource
                        ContentResource.java
  Log:
  Added a JavaDoc link to the Template class, since for some (likely
  historical) reason they are in different packages.
  
  Revision  Changes    Path
  1.9       +9 -6      jakarta-velocity/src/java/org/apache/velocity/runtime/resource/ContentResource.java
  
  Index: ContentResource.java
  ===================================================================
  RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/resource/ContentResource.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -u -r1.8 -r1.9
  --- ContentResource.java	25 Mar 2002 18:00:49 -0000	1.8
  +++ ContentResource.java	10 Oct 2002 17:28:09 -0000	1.9
  @@ -59,9 +59,11 @@
   import java.io.InputStreamReader;
   
   /**
  - * This class represent a general text resource that
  - * may have been retrieved from any number of possible
  - * sources.
  + * This class represent a general text resource that may have been
  + * retrieved from any number of possible sources.
  + *
  + * Also of interest is Velocity's {@link org.apache.velocity.Template}
  + * <code>Resource</code>.
    *
    * @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
    * @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
  @@ -84,7 +86,8 @@
               StringWriter sw = new StringWriter();
               
               reader = new BufferedReader(
  -                new InputStreamReader(resourceLoader.getResourceStream(name), encoding));
  +                new InputStreamReader(resourceLoader.getResourceStream(name),
  +                                      encoding));
               
               char buf[] = new char[1024];
               int len = 0;
  @@ -92,7 +95,7 @@
               while ( ( len = reader.read( buf, 0, 1024 )) != -1)
                   sw.write( buf, 0, len );
           
  -            data = sw.toString();
  +            setData(sw.toString());
              
               return true;
           }
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>