org.apache.xml.utils

Class StringBufferPool

public class StringBufferPool extends Object

This class pools string buffers, since they are reused so often. String buffers are good candidates for pooling, because of their supporting character arrays.

UNKNOWN: internal

Method Summary
static voidfree(FastStringBuffer sb)
Return a string buffer back to the pool.
static FastStringBufferget()
Get the first free instance of a string buffer, or create one if there are no free instances.

Method Detail

free

public static void free(FastStringBuffer sb)
Return a string buffer back to the pool.

Parameters: sb Must be a non-null reference to a string buffer.

get

public static FastStringBuffer get()
Get the first free instance of a string buffer, or create one if there are no free instances.

Returns: A string buffer ready for use.

Copyright B) 2005 Apache XML Project. All Rights Reserved.