Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 79 for bytesRead (0.08 sec)

  1. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerReader.kt

      private class CountingSource(
        source: Source,
      ) : ForwardingSource(source) {
        var bytesRead = 0L
    
        override fun read(
          sink: Buffer,
          byteCount: Long,
        ): Long {
          val result = delegate.read(sink, byteCount)
          if (result == -1L) return -1L
          bytesRead += result
          return result
        }
      }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 10.5K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/smb1/AndXServerMessageBlockTest.java

                paramWordsRead = 10;
                return paramWordsRead;
            }
    
            @Override
            protected int readBytesWireFormat(byte[] src, int srcIndex) {
                bytesRead = 20;
                return bytesRead;
            }
    
            @Override
            public boolean isRetainPayload() {
                return retainPayload;
            }
    
            @Override
            public void setRawPayload(byte[] payload) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 19.4K bytes
    - Viewed (0)
  3. src/test/java/jcifs/internal/smb2/tree/Smb2TreeDisconnectRequestTest.java

            Smb2TreeDisconnectRequest request = new Smb2TreeDisconnectRequest(mockConfig);
            byte[] buffer = createTestData(256);
    
            // When
            int bytesRead = request.readBytesWireFormat(buffer, 0);
    
            // Then
            assertEquals(0, bytesRead);
        }
    
        @ParameterizedTest
        @ValueSource(ints = { 0, 10, 50, 100, 200 })
        @DisplayName("Should write consistent structure at different offsets")
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14.1K bytes
    - Viewed (0)
  4. src/test/java/jcifs/smb/SmbFileIntegrationTest.java

                byte[] buffer = new byte[10];
                int bytesRead = in.read(buffer);
                assertEquals(10, bytesRead, "Should read requested bytes");
                assertEquals("0123456789", new String(buffer, 0, bytesRead, "UTF-8"));
    
                // Read next chunk
                bytesRead = in.read(buffer);
                assertEquals(10, bytesRead, "Should read next chunk");
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 56K bytes
    - Viewed (0)
  5. src/test/java/jcifs/internal/smb2/Smb2EchoRequestTest.java

            @Test
            @DisplayName("Should always return 0")
            void testReadBytesWireFormat() {
                byte[] buffer = new byte[100];
    
                int bytesRead = echoRequest.readBytesWireFormat(buffer, 0);
    
                assertEquals(0, bytesRead);
            }
    
            @Test
            @DisplayName("Should return 0 regardless of buffer content")
            void testReadBytesWithVariousBufferContent() {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.3K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/smb2/info/Smb2SetInfoRequestTest.java

            request = new Smb2SetInfoRequest(mockConfig);
            byte[] buffer = new byte[256];
    
            int bytesRead = request.readBytesWireFormat(buffer, 0);
    
            // This method should always return 0 as the request doesn't read responses
            assertEquals(0, bytesRead);
        }
    
        @Test
        @DisplayName("Test complete flow with all setters")
        void testCompleteFlow() {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 13.9K bytes
    - Viewed (0)
  7. src/test/java/jcifs/internal/smb2/Smb2EchoResponseTest.java

                when(mockConfig.isRequireSecureNegotiate()).thenReturn(false);
    
                // Read the response
                int bytesRead = echoResponse.readBytesWireFormat(buffer, bufferIndex);
                assertEquals(0, bytesRead);
    
                // Write response (echo responses don't write data)
                int bytesWritten = echoResponse.writeBytesWireFormat(buffer, 0);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.1K bytes
    - Viewed (0)
  8. src/test/java/jcifs/internal/smb2/nego/Smb2NegotiateResponseTest.java

        void testReadBytesWireFormatValid() throws Exception {
            // Given
            byte[] buffer = createValidNegotiateResponseBuffer();
    
            // When
            int bytesRead = response.readBytesWireFormat(buffer, 0);
    
            // Then
            assertTrue(bytesRead > 0);
            assertEquals(Smb2Constants.SMB2_NEGOTIATE_SIGNING_REQUIRED, response.getSecurityMode());
            assertEquals(0x0311, response.getDialectRevision());
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 32.5K bytes
    - Viewed (0)
  9. src/test/java/jcifs/internal/smb2/info/Smb2QueryDirectoryRequestTest.java

        void testReadBytesWireFormat() {
            request = new Smb2QueryDirectoryRequest(mockConfig);
            byte[] buffer = new byte[100];
    
            int bytesRead = request.readBytesWireFormat(buffer, 0);
    
            assertEquals(0, bytesRead);
        }
    
        @Test
        @DisplayName("Test size calculation with different buffer sizes")
        void testSizeCalculationWithDifferentBufferSizes() {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 13.2K bytes
    - Viewed (0)
  10. okhttp/src/jvmTest/kotlin/okhttp3/internal/ws/MessageDeflaterInflaterTest.kt

      }
    
      /**
       * We had a bug where self-finishing inflater streams would infinite loop!
       * https://github.com/square/okhttp/issues/8078
       */
      @Test fun `inflate returns finished before bytesRead reaches input length`() {
        val inflater = MessageInflater(false)
        val message = "53621260020000".decodeHex()
        assertThat(inflater.inflate(message)).isEqualTo("22021002".decodeHex())
      }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 5K bytes
    - Viewed (0)
Back to top