286N/A * reserved comment block 286N/A * DO NOT REMOVE OR ALTER! 286N/A * Copyright 1999-2004 The Apache Software Foundation. 286N/A * Licensed under the Apache License, Version 2.0 (the "License"); 286N/A * you may not use this file except in compliance with the License. 286N/A * You may obtain a copy of the License at 286N/A * Unless required by applicable law or agreed to in writing, software 286N/A * distributed under the License is distributed on an "AS IS" BASIS, 286N/A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 286N/A * See the License for the specific language governing permissions and 286N/A * limitations under the License. 286N/A * This class pools string buffers, since they are reused so often. 286N/A * String buffers are good candidates for pooling, because of 286N/A * their supporting character arrays. 286N/A /** The global pool of string buffers. */ 286N/A * Get the first free instance of a string buffer, or create one 286N/A * if there are no free instances. 286N/A * @return A string buffer ready for use. 286N/A * Return a string buffer back to the pool. 286N/A * @param sb Must be a non-null reference to a string buffer. 286N/A // Since this isn't synchronized, setLength must be 286N/A // done before the instance is freed. 286N/A // Fix attributed to Peter Speck <speck@ruc.dk>.