APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.xml.internal.utils

public Class StringBufferPool

extends Object
Class Inheritance

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

Field Summary

Modifier and TypeField and Description
private static ObjectPool
m_stringBufPool

The global pool of string buffers.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static synchronized void
free(FastStringBuffer
Must be a non-null reference to a string buffer.
sb
)

Return a string buffer back to the pool.

public static synchronized FastStringBuffer

Returns:

A string buffer ready for use.
get
()

Get the first free instance of a string buffer, or create one if there are no free instances.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

m_stringBufPoolback to summary
private static ObjectPool m_stringBufPool

The global pool of string buffers.

Constructor Detail

StringBufferPoolback to summary
public StringBufferPool()

Method Detail

freeback to summary
public static synchronized void free(FastStringBuffer sb)

Return a string buffer back to the pool.

Parameters
sb:FastStringBuffer

Must be a non-null reference to a string buffer.

getback to summary
public static synchronized FastStringBuffer get()

Get the first free instance of a string buffer, or create one if there are no free instances.

Returns:FastStringBuffer

A string buffer ready for use.