Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 81 for bytesRead (0.04 sec)

  1. 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
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 6.4K bytes
    - Viewed (0)
  2. src/test/java/jcifs/smb1/smb1/SmbComReadAndXResponseTest.java

                writeInt2(dataOffset, buffer, bufferIndex);
            }
    
            @Test
            public void testReadParameterWordsWireFormat() {
                int bytesRead = response.readParameterWordsWireFormat(buffer, 0);
    
                assertEquals(20, bytesRead);
                assertEquals(dataCompactionMode, response.dataCompactionMode);
                assertEquals(dataLength, response.dataLength);
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 3.3K bytes
    - Viewed (0)
  3. src/test/java/jcifs/netbios/SessionRetargetResponsePacketTest.java

            // Create a buffer large enough to hold the read bytes
            byte[] buffer = new byte[6];
            int bytesRead = packet.readTrailerWireFormat(bais, buffer, 0);
    
            // Verify that 6 bytes were read, which is the expected length.
            assertEquals(6, bytesRead);
        }
    
        @Test
        void readTrailerWireFormatShouldThrowIOExceptionOnUnexpectedEOF() throws IOException {
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 3K bytes
    - Viewed (0)
  4. 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());
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 26.9K bytes
    - Viewed (0)
  5. src/test/java/jcifs/internal/smb1/trans/nt/FileNotifyInformationImplTest.java

            int action = FileNotifyInformation.FILE_ACTION_MODIFIED;
            byte[] buffer = createValidNotificationBuffer(fileName, action);
    
            int bytesRead = notifyInfo.decode(buffer, 0, buffer.length);
    
            assertTrue(bytesRead > 0);
            assertEquals(0, notifyInfo.getNextEntryOffset()); // Single entry has 0 offset
            assertEquals(action, notifyInfo.getAction());
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 13.1K bytes
    - Viewed (0)
  6. 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;
            }
          };
        }
      }
    
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Sat Jan 12 03:31:36 UTC 2019
    - 3.9K bytes
    - Viewed (0)
  7. src/test/java/jcifs/internal/smb1/net/NetServerEnum2ResponseTest.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));
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 25.4K bytes
    - Viewed (0)
  8. src/test/java/jcifs/internal/smb1/trans/nt/NtTransQuerySecurityDescResponseTest.java

            setErrorCode(response, 0);
    
            int bytesRead = response.readDataWireFormat(fullBuffer, startIndex, buffer.length);
    
            // Verify the method returns the correct number of bytes read
            assertTrue(bytesRead > 0);
            assertTrue(bytesRead <= buffer.length);
        }
    
        /**
         * Helper method to create a valid security descriptor buffer
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 10.8K bytes
    - Viewed (0)
  9. src/test/java/jcifs/smb1/smb1/SmbRandomAccessFileTest.java

                    return null;
                }
            }).when(smbFile).send(any(SmbComReadAndX.class), any(SmbComReadAndXResponse.class));
    
            int bytesRead = smbRandomAccessFile.read(buffer);
            assertEquals(10, bytesRead);
            assertArrayEquals(new byte[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }, buffer);
            assertEquals(10, smbRandomAccessFile.getFilePointer());
        }
    
        @Test
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.3K bytes
    - Viewed (0)
  10. src/test/java/jcifs/internal/fscc/FileBasicInfoTest.java

            int startIndex = 5;
            original.encode(buffer, startIndex);
    
            // Now decode into a new instance
            int bytesRead = fileBasicInfo.decode(buffer, startIndex, 36);
    
            // Verify bytes read
            assertEquals(36, bytesRead);
    
            // Verify decoded values match original
            assertEquals(TEST_CREATE_TIME, fileBasicInfo.getCreateTime());
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.5K bytes
    - Viewed (0)
Back to top