Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 818 for buffers (0.41 sec)

  1. src/test/java/jcifs/smb1/smb1/BufferCacheSecurityTest.java

                assertNotNull(buffer, "Buffer should not be null even when cache is full");
                assertEquals(SmbComTransaction.TRANSACTION_BUF_SIZE, buffer.length, "Buffer should have correct size");
                buffers.add(buffer);
            }
    
            // When - Release all buffers back
            for (byte[] buffer : buffers) {
                BufferCache.releaseBuffer(buffer);
            }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 9.6K bytes
    - Viewed (0)
  2. src/test/java/jcifs/BufferCacheTest.java

            byte[] buffer2 = testCache.getBuffer();
    
            // Then
            assertNotNull(buffer1, "First buffer should not be null");
            assertNotNull(buffer2, "Second buffer should not be null");
            assertEquals(1024, buffer1.length, "Buffer should have expected size");
            assertEquals(1024, buffer2.length, "Buffer should have expected size");
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.3K bytes
    - Viewed (0)
  3. src/test/java/jcifs/internal/SmbNegotiationTest.java

            assertSame(testResponseBuffer, negotiationWithNullResponse.getResponseRaw());
        }
    
        @Test
        @DisplayName("Constructor with null buffers should work")
        void testConstructorWithNullBuffers() {
            // Test that null buffers are handled properly
            SmbNegotiation negotiationWithNullBuffers = new SmbNegotiation(mockRequest, mockResponse, null, null);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 10.9K bytes
    - Viewed (0)
  4. src/test/java/jcifs/pac/PacTest.java

            assertThrows(Exception.class, () -> new Pac(pacData, keys));
        }
    
        @Test
        void testZeroBufferCount() throws IOException {
            // Test PAC with zero buffers (missing required buffers)
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            writeLittleEndianInt(baos, 0); // bufferCount = 0
            writeLittleEndianInt(baos, PacConstants.PAC_VERSION); // valid version
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7.9K bytes
    - Viewed (0)
  5. src/test/java/jcifs/smb/SmbCopyUtilTest.java

                byte[][] buffers = new byte[][] { new byte[8], new byte[8] };
    
                when(src.toString()).thenReturn("smb://src");
                when(dest.toString()).thenReturn("smb://dest");
    
                // Act + Assert
                SmbException ex =
                        assertThrows(SmbException.class, () -> SmbCopyUtil.copyFile(src, dest, buffers, 8, new WriterThread(), sh, dh));
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.1K bytes
    - Viewed (0)
  6. src/main/java/jcifs/internal/smb2/rdma/RdmaBufferManager.java

         *
         * @param buffer buffer to release
         */
        public void releaseBuffer(ByteBuffer buffer) {
            // For direct buffers, we rely on GC
            // Could implement a more sophisticated buffer pool here
        }
    
        /**
         * Clean up all pooled regions
         *
         * This method should be called when shutting down to
         * release all resources.
         */
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 23 05:11:12 UTC 2025
    - 8.7K bytes
    - Viewed (0)
  7. src/main/java/jcifs/smb/BufferCacheImpl.java

         */
        public BufferCacheImpl(final Configuration cfg) {
            this(cfg.getBufferCacheSize(), cfg.getMaximumBufferSize());
        }
    
        /**
         * Constructs a buffer cache with specified parameters.
         *
         * @param maxBuffers the maximum number of buffers to cache
         * @param maxSize the size of each buffer in bytes
         *
         */
        public BufferCacheImpl(final int maxBuffers, final int maxSize) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 3.2K bytes
    - Viewed (0)
  8. src/main/java/jcifs/smb1/smb1/BufferCache.java

     */
    
    package jcifs.smb1.smb1;
    
    import jcifs.smb1.Config;
    
    /**
     * Buffer cache implementation for SMB1 protocol operations.
     * Manages a pool of byte buffers to reduce garbage collection overhead.
     *
     * Performance optimizations:
     * - Uses ConcurrentLinkedQueue for O(1) operations
     * - Lock-free operations for better concurrency
     * - Proper buffer validation and limits
     */
    public class BufferCache {
    
        /**
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 4.2K bytes
    - Viewed (0)
  9. src/test/java/jcifs/pac/kerberos/KerberosPacAuthDataTest.java

            assertTrue(e.getMessage().contains("PAC"));
        }
    
        // Test exception for missing buffers
        @Test
        void testConstructorMissingBuffers() throws IOException {
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            DataOutputStream dos = new DataOutputStream(baos);
    
            // Write header with no buffers
            dos.writeInt(Integer.reverseBytes(0));
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 6.3K bytes
    - Viewed (0)
  10. src/test/java/jcifs/internal/smb2/tree/Smb2TreeDisconnectResponseTest.java

            // Given
            byte[] buffer1 = new byte[256];
            byte[] buffer2 = new byte[256];
    
            // Prepare both buffers with valid structure
            SMBUtil.writeInt2(4, buffer1, 0);
            SMBUtil.writeInt2(0, buffer1, 2);
            SMBUtil.writeInt2(4, buffer2, 10);
            SMBUtil.writeInt2(0, buffer2, 12);
    
            // When
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14.1K bytes
    - Viewed (0)
Back to top