1 15 package org.apache.tapestry.script; 16 17 import org.apache.hivemind.Location; 18 19 20 28 29 class BodyToken extends AbstractToken 30 { 31 private int _bufferLengthHighwater = 100; 32 33 public BodyToken(Location location) 34 { 35 super(location); 36 } 37 38 public void write(StringBuffer buffer, ScriptSession session) 39 { 40 if (buffer != null) 41 throw new IllegalArgumentException (); 42 43 buffer = new StringBuffer (_bufferLengthHighwater); 44 45 writeChildren(buffer, session); 46 47 session.addBodyScript(buffer.toString()); 48 49 52 _bufferLengthHighwater = Math.max(_bufferLengthHighwater, buffer.length()); 53 } 54 } | Popular Tags |