Module jcifs

Class BufferCache

java.lang.Object
org.codelibs.jcifs.smb1.BufferCache

public class BufferCache extends Object
Buffer cache implementation for SMB1 protocol operations. Manages a pool of byte buffers to reduce garbage collection overhead.
  • 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