1 16 19 package org.apache.xml.utils; 20 21 27 public class StringBufferPool 28 { 29 30 31 private static ObjectPool m_stringBufPool = 32 new ObjectPool(org.apache.xml.utils.FastStringBuffer.class); 33 34 40 public synchronized static FastStringBuffer get() 41 { 42 return (FastStringBuffer) m_stringBufPool.getInstance(); 43 } 44 45 50 public synchronized static void free(FastStringBuffer sb) 51 { 52 sb.setLength(0); 56 m_stringBufPool.freeInstance(sb); 57 } 58 } 59 | Popular Tags |