Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 17 for BytesRead (0.05 seconds)

  1. src/test/java/jcifs/internal/smb2/io/Smb2ReadResponseTest.java

            // When
            int bytesRead = testResponse.readBytesWireFormat(buffer, bufferIndex);
    
            // Then
            assertTrue(testResponse.errorResponseCalled);
            assertEquals(8, bytesRead); // Error response is 8 bytes
        }
    
        @DisplayName("Should throw exception for invalid structure size")
        @ParameterizedTest
    Created: Sat Dec 20 13:44:44 GMT 2025
    - Last Modified: Sun Aug 31 08:00:57 GMT 2025
    - 22.1K bytes
    - Click Count (0)
  2. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/ws/MessageInflater.kt

        val totalBytesToRead = inflater.bytesRead + deflatedBytes.size
    
        // We cannot read all, as the source does not close.
        // Instead, we ensure that all bytes from source have been processed by inflater.
        do {
          inflaterSource.readOrInflate(buffer, Long.MAX_VALUE)
        } while (inflater.bytesRead < totalBytesToRead && !inflater.finished())
    
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Sun Sep 21 06:26:07 GMT 2025
    - 2.4K bytes
    - Click Count (0)
  3. fess-crawler/src/test/java/org/codelibs/fess/crawler/util/ResponseDataUtilTest.java

            // Read and verify content
            try (FileInputStream fis = new FileInputStream(tempFile)) {
                byte[] buffer = new byte[1024];
                int bytesRead = fis.read(buffer);
                String content = new String(buffer, 0, bytesRead);
                assertEquals("Test response body", content);
            } finally {
                // Clean up
                tempFile.delete();
            }
        }
    
    Created: Sat Dec 20 11:21:39 GMT 2025
    - Last Modified: Sat Nov 22 13:28:22 GMT 2025
    - 7.9K bytes
    - Click Count (0)
  4. src/test/java/org/codelibs/curl/io/ContentCacheTest.java

            try (InputStream stream = cache.getInputStream()) {
                byte[] buffer = new byte[1024];
                int bytesRead = stream.read(buffer);
                byte[] result = new byte[bytesRead];
                System.arraycopy(buffer, 0, result, 0, bytesRead);
                assertArrayEquals(originalData, result);
            }
        }
    
        @Test
    Created: Sat Dec 20 09:13:53 GMT 2025
    - Last Modified: Thu Nov 20 13:34:13 GMT 2025
    - 11.2K bytes
    - Click Count (0)
  5. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/cache/CacheInterceptor.kt

                }
                throw e
              }
    
              if (bytesRead == -1L) {
                if (!cacheRequestClosed) {
                  cacheRequestClosed = true
                  cacheBody.close() // The cache response is complete!
                }
                return -1
              }
    
              sink.copyTo(cacheBody.buffer, sink.size - bytesRead, bytesRead)
              cacheBody.emitCompleteSegments()
              return bytesRead
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Wed Nov 05 18:28:35 GMT 2025
    - 10.3K bytes
    - Click Count (0)
  6. fess-crawler/src/test/java/org/codelibs/fess/crawler/entity/ResponseDataTest.java

            assertNotNull(data.getResponseBody());
    
            try (InputStream is = data.getResponseBody()) {
                byte[] buffer = new byte[content.length];
                int bytesRead = is.read(buffer);
                assertEquals(content.length, bytesRead);
                assertTrue(Arrays.equals(content, buffer));
            } catch (IOException e) {
                fail("IOException should not occur: " + e.getMessage());
            }
        }
    Created: Sat Dec 20 11:21:39 GMT 2025
    - Last Modified: Thu Nov 13 13:29:22 GMT 2025
    - 14.3K bytes
    - Click Count (0)
  7. fess-crawler/src/test/java/org/codelibs/fess/crawler/util/IgnoreCloseInputStreamTest.java

            IgnoreCloseInputStream stream = new IgnoreCloseInputStream(underlyingStream);
    
            byte[] buffer = new byte[5];
            int bytesRead = stream.read(buffer);
    
            assertEquals(5, bytesRead);
            assertEquals("Hello", new String(buffer));
        }
    
        public void test_readBytesWithOffset_delegatesToUnderlying() throws IOException {
    Created: Sat Dec 20 11:21:39 GMT 2025
    - Last Modified: Sat Nov 22 13:28:22 GMT 2025
    - 6.6K bytes
    - Click Count (0)
  8. src/test/java/org/codelibs/curl/CurlResponseTest.java

                assertNotNull(stream);
                byte[] buffer = new byte[1024];
                int bytesRead = stream.read(buffer);
                assertEquals(data.length, bytesRead);
                assertArrayEquals(data, Arrays.copyOf(buffer, bytesRead));
            }
        }
    
        @Test
        public void testGetContentAsStreamWithoutCache() {
            CurlResponse response = new CurlResponse();
    Created: Sat Dec 20 09:13:53 GMT 2025
    - Last Modified: Thu Nov 20 13:34:13 GMT 2025
    - 12.5K bytes
    - Click Count (0)
  9. src/test/java/jcifs/internal/smb2/notify/Smb2ChangeNotifyResponseTest.java

            System.arraycopy(fileNameBytes, 0, buffer, notifyOffset + 12, fileNameBytes.length);
    
            // When
            int bytesRead = response.readBytesWireFormat(buffer, offset);
    
            // Then
            assertTrue(bytesRead > 0);
            List<FileNotifyInformation> notifications = response.getNotifyInformation();
            assertEquals(1, notifications.size());
    
    Created: Sat Dec 20 13:44:44 GMT 2025
    - Last Modified: Sun Aug 31 08:00:57 GMT 2025
    - 18.8K bytes
    - Click Count (0)
  10. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/Exchange.kt

            call.eventListener.requestFailed(call, e)
          } else {
            call.eventListener.requestBodyEnd(call, bytesRead)
          }
        }
        if (responseDone) {
          if (e != null) {
            call.eventListener.responseFailed(call, e)
          } else {
            call.eventListener.responseBodyEnd(call, bytesRead)
          }
        }
        return call.messageDone(
          exchange = this,
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Wed Nov 05 18:28:35 GMT 2025
    - 10.5K bytes
    - Click Count (0)
Back to Top