java.lang.Object
org.codelibs.jcifs.smb1.BufferCache
Buffer cache implementation for SMB1 protocol operations.
Manages a pool of byte buffers to reduce garbage collection overhead.
-
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]Gets a buffer from the cache or creates a new one if the cache is empty.static voidreleaseBuffer(byte[] buf) Returns a buffer to the cache for reuse.
-
Method Details
-
getBuffer
public static byte[] getBuffer()Gets a buffer from the cache or creates a new one if the cache is empty.- Returns:
- a byte buffer for SMB operations
-
releaseBuffer
public static void releaseBuffer(byte[] buf) Returns a buffer to the cache for reuse.- Parameters:
buf- the buffer to return to the cache
-