a.java 源代码


package p1;

import android.util.Log;
import java.util.Queue;

public final class a {

    private static final a f25463b = new a();

    private final Queue<byte[]> f25464a = h.c(0);

    private a() {
    }

    public static a a() {
        return f25463b;
    }

    public byte[] b() {
        byte[] poll;
        synchronized (this.f25464a) {
            poll = this.f25464a.poll();
        }
        if (poll == null) {
            poll = new byte[65536];
            if (Log.isLoggable("ByteArrayPool", 3)) {
                Log.d("ByteArrayPool", "Created temp bytes");
            }
        }
        return poll;
    }

    public boolean c(byte[] bArr) {
        boolean z6 = false;
        if (bArr.length != 65536) {
            return false;
        }
        synchronized (this.f25464a) {
            if (this.f25464a.size() < 32) {
                this.f25464a.offer(bArr);
                z6 = true;
            }
        }
        return z6;
    }
}