Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 21 - 30 of 78 for BytesRead (0.12 seconds)

  1. src/test/java/jcifs/internal/smb1/trans/TransTransactNamedPipeTest.java

            byte[] buffer = new byte[10];
    
            // Act
            int bytesRead = trans.readSetupWireFormat(buffer, 0, 10);
    
            // Assert
            assertEquals(0, bytesRead);
        }
    
        @Test
        @DisplayName("Test readParametersWireFormat returns 0")
        void testReadParametersWireFormat() {
            // Arrange
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 9.7K bytes
    - Click Count (0)
  2. samples/guide/src/main/java/okhttp3/recipes/Progress.java

              long bytesRead = super.read(sink, byteCount);
              // read() returns the number of bytes read, or -1 if this source is exhausted.
              totalBytesRead += bytesRead != -1 ? bytesRead : 0;
              progressListener.update(totalBytesRead, responseBody.contentLength(), bytesRead == -1);
              return bytesRead;
            }
          };
        }
      }
    
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Sat Jan 12 03:31:36 GMT 2019
    - 3.9K bytes
    - Click Count (0)
  3. src/test/java/jcifs/internal/smb1/net/NetShareEnumResponseTest.java

            bufferIndex += 2;
            // totalAvailableEntries (2 bytes)
            SMBUtil.writeInt2(5, buffer, bufferIndex);
    
            int bytesRead = response.readParametersWireFormat(buffer, 0, 8);
    
            assertEquals(8, bytesRead);
            assertEquals(0, getStatus(response));
            assertEquals(100, getConverter(response));
            assertEquals(3, getNumEntries(response));
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 20.2K bytes
    - Click Count (0)
  4. 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 Apr 03 11:42:14 GMT 2026
    - Last Modified: Sun Jan 11 12:06:21 GMT 2026
    - 10.3K bytes
    - Click Count (0)
  5. 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: Thu Apr 02 15:34:12 GMT 2026
    - Last Modified: Sat Mar 21 09:11:12 GMT 2026
    - 17.7K bytes
    - Click Count (0)
  6. 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: Thu Apr 02 15:34:12 GMT 2026
    - Last Modified: Sat Mar 21 09:11:12 GMT 2026
    - 15.9K bytes
    - Click Count (0)
  7. src/test/java/jcifs/internal/smb1/com/SmbComCloseTest.java

            // Given
            SmbComClose smbComClose = new SmbComClose(config, 1, 1L);
            byte[] buffer = new byte[0];
    
            // When
            int bytesRead = smbComClose.readParameterWordsWireFormat(buffer, 0);
    
            // Then
            assertEquals(0, bytesRead);
        }
    
        /**
         * Test method for {@link jcifs.internal.smb1.com.SmbComClose#readBytesWireFormat(byte[], int)}.
         */
        @Test
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 6.4K bytes
    - Click Count (0)
  8. src/test/java/jcifs/internal/smb2/create/Smb2CloseResponseTest.java

                SMBUtil.writeInt4(0x20, buffer, bufferIndex + 56); // FILE_ATTRIBUTE_ARCHIVE
    
                // When
                int bytesRead = response.readBytesWireFormat(buffer, bufferIndex);
    
                // Then
                assertEquals(60, bytesRead);
                assertEquals(SMB2_CLOSE_FLAG_POSTQUERY_ATTIB, response.getCloseFlags());
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 26.9K bytes
    - Click Count (0)
  9. src/test/java/jcifs/smb1/smb1/Trans2QueryFSInformationResponseTest.java

            writeInt4(1000, buffer, 8); // alloc
            writeInt4(500, buffer, 12); // free
            writeInt2(512, buffer, 16); // bytesPerSect
    
            int bytesRead = response.readDataWireFormat(buffer, 0, buffer.length);
    
            assertEquals(20, bytesRead, "Should read 20 bytes");
            assertNotNull(response.info, "Info object should not be null");
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 8.6K bytes
    - Click Count (0)
  10. src/test/java/jcifs/internal/fscc/FileEndOfFileInformationTest.java

            byte[] buffer = new byte[16];
            SMBUtil.writeInt8(expectedValue, buffer, 0);
    
            // Decode
            int bytesRead = fileInfo.decode(buffer, 0, buffer.length);
    
            // Verify bytes read
            assertEquals(8, bytesRead);
    
            // Verify decoded value through toString
            assertTrue(fileInfo.toString().contains("endOfFile=" + expectedValue));
        }
    
        @Test
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 9.9K bytes
    - Click Count (0)
Back to Top