FileDocCategorySizeDatePackage
TemporaryBuffer.javaAPI DocAndroid 1.5 API1287Wed May 06 22:42:00 BST 2009android.graphics

TemporaryBuffer

public class TemporaryBuffer extends Object

Fields Summary
private static char[]
sTemp
Constructors Summary
Methods Summary
static char[]obtain(int len)

        char[] buf;

        synchronized (TemporaryBuffer.class) {
            buf = sTemp;
            sTemp = null;
        }

        if (buf == null || buf.length < len)
            buf = new char[ArrayUtils.idealCharArraySize(len)];

        return buf;
    
static voidrecycle(char[] temp)

        if (temp.length > 1000)
            return;

        synchronized (TemporaryBuffer.class) {
            sTemp = temp;
        }