synchronized( cache ) {
byte[] buf;
if (freeBuffers > 0) {
for (int i = 0; i < MAX_BUFFERS; i++) {
if( cache[i] != null ) {
buf = (byte[])cache[i];
cache[i] = null;
freeBuffers--;
return buf;
}
}
}
buf = new byte[SmbComTransaction.TRANSACTION_BUF_SIZE];
return buf;
}