copy (inStream, out, part.getTagStart()-inPos, buf);  context.startTag (i); try{ part.executeTag (context);
copy(inStream, out, part.getTagStart()-inPos, buf);  context.startTag(i); try { part.executeTag(context, inStream);
    private void interpretPage(DataSource source, 			       Vector parts, ParseContext context)	throws IOException {      	OutputStream out = context.getOutputStream();	InputStream inStream = null;	byte buf[] = null;      	try {	    // input	    inStream = source.getInputStream();	    long inPos = 0;	  	    /*	     * Get Copy Buffer.	     * If we allocate it here once and pass it to the	     * copy()-function we don't have to create and garbage collect	     * a buffer each time we call copy().	     *	     * REVISE: this should use a buffer Manager:	     * a queue which stores buffers. This	     * way the JVM doesn't have to garbage collect the buffers	     * created here, so we may use larger Buffers	     * here.	     */	    buf = new byte[4096]; // Get buffer from Buffer Manager	  	    for (int i = 0; i < parts.size(); i++) {		/** <critical-path> **/		SpecialTagHandler part = (SpecialTagHandler) parts.elementAt(i);		// copy DataSource content till the beginning of the Tag:		copy (inStream, out, part.getTagStart()-inPos, buf);	      		context.startTag (i);		try{		    part.executeTag (context);		}		/*		 * Display any Exceptions or Errors as		 * comment in the page		 */		catch (Throwable e) { 		    out.flush();		    PrintWriter pout = new PrintWriter(out);		    pout.println("<!-- ERROR: ------------");		    e.printStackTrace(pout);		    pout.println("-->");		    pout.flush();		}		context.doneTag (i);	      		// skip the <SPECIAL_TAG> ... </SPECIAL_TAG> area:		inStream.skip(part.getTagLength());		inPos = part.getTagStart()+part.getTagLength();		/** </critical-path> **/	    }	    // copy rest until end of DataSource	    copy (inStream, out, -1, buf);	}	finally {	    // clean up resouce: opened input stream	    if (inStream != null)		inStream.close();	    buf = null; // return buffer to Buffer Manager	}	out.flush();    }