- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 108 for readDataWireFormat (0.12 seconds)
-
src/test/java/jcifs/internal/smb1/trans/nt/NtTransQuerySecurityDescResponseTest.java
} @Test @DisplayName("Test readDataWireFormat with error code returns 4") void testReadDataWireFormatWithErrorCode() throws Exception { byte[] buffer = new byte[100]; // Set error code to non-zero setErrorCode(response, 1); int result = response.readDataWireFormat(buffer, 0, buffer.length); assertEquals(4, result);Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 10.8K bytes - Click Count (0) -
src/test/java/jcifs/smb1/smb1/TransTransactNamedPipeResponseTest.java
} /** * Tests the readDataWireFormat method when the pipe's input stream is null. */ @Test void testReadDataWireFormat_withNullPipeIn() { mockPipe.pipeIn = null; byte[] buffer = new byte[10]; int len = 10; int result = response.readDataWireFormat(buffer, 0, len); assertEquals(len, result, "readDataWireFormat should return the length when pipeIn is null.");Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 5.3K bytes - Click Count (0) -
src/test/java/jcifs/internal/smb1/trans2/Trans2QueryPathInformationResponseTest.java
response = new Trans2QueryPathInformationResponse(mockConfig, FileInformation.FILE_BASIC_INFO); // Simulate setting info through readDataWireFormat byte[] buffer = createMockFileBasicInfoBuffer(); response.setDataCount(buffer.length); response.readDataWireFormat(buffer, 0, buffer.length); FileBasicInfo info = response.getInfo(FileBasicInfo.class); assertNotNull(info);
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 11.9K bytes - Click Count (0) -
src/test/java/jcifs/internal/smb1/net/NetShareEnumResponseTest.java
} } @Test @DisplayName("Test readDataWireFormat with empty shares list") void testReadDataWireFormatEmptyShares() throws Exception { setNumEntries(response, 0); byte[] buffer = new byte[100]; int bytesRead = response.readDataWireFormat(buffer, 0, buffer.length); assertEquals(0, bytesRead);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) -
src/test/java/jcifs/smb1/smb1/Trans2SetFileInformationResponseTest.java
} /** * Test for the readDataWireFormat method. * It should always return 0. */ @Test void testReadDataWireFormat() { byte[] buffer = new byte[10]; // The method should not read anything and return 0 assertEquals(0, response.readDataWireFormat(buffer, 0, 10), "readDataWireFormat should return 0."); } /**Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 3.8K bytes - Click Count (0) -
src/test/java/jcifs/internal/smb1/trans2/Trans2GetDfsReferralResponseTest.java
void testReadDataWireFormat() { byte[] buffer = createValidDfsReferralBuffer(); int bytesRead = response.readDataWireFormat(buffer, 0, buffer.length); assertTrue(bytesRead > 0); // readDataWireFormat returns bytes consumed from header, not full buffer assertEquals(28, bytesRead); // Header + one referral structure
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 19.4K bytes - Click Count (0) -
src/test/java/jcifs/internal/smb1/trans/SmbComTransactionResponseTest.java
return parametersWireFormatReturn; } @Override protected int readDataWireFormat(byte[] buffer, int bufferIndex, int len) throws SMBProtocolDecodingException { if (throwExceptionOnReadData) { throw new SMBProtocolDecodingException("Test exception in readDataWireFormat"); } return dataWireFormatReturn; } // Helper methods for testingCreated: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 13.4K bytes - Click Count (0) -
src/test/java/jcifs/smb1/smb1/TransWaitNamedPipeResponseTest.java
@ValueSource(ints = { 0, 4, -4, Integer.MAX_VALUE }) @DisplayName("readDataWireFormat returns 0 regardless of buffer and length") void readDataWireFormatReturnsZero(int len) { TransWaitNamedPipeResponse resp = new TransWaitNamedPipeResponse(); assertEquals(0, resp.readDataWireFormat(new byte[10], 0, len), "readDataWireFormat should always return 0"); } } /**Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 07:14:38 GMT 2025 - 5.4K bytes - Click Count (0) -
src/test/java/jcifs/smb1/smb1/Trans2QueryFSInformationResponseTest.java
} /** * Tests the readDataWireFormat method with an unknown information level. */ @Test void testReadDataWireFormat_UnknownInformationLevel() { Trans2QueryFSInformationResponse response = new Trans2QueryFSInformationResponse(999); // Unknown level byte[] buffer = new byte[10]; int bytesRead = response.readDataWireFormat(buffer, 0, buffer.length);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) -
src/main/java/jcifs/smb1/smb1/SmbComTransactionResponse.java
dataDone = true; } if (parametersDone && dataDone) { hasMore = false; readParametersWireFormat(txn_buf, bufParameterStart, totalParameterCount); readDataWireFormat(txn_buf, bufDataStart, totalDataCount); } return pad + parameterCount + pad1 + dataCount; } abstract int writeSetupWireFormat(byte[] dst, int dstIndex);Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 07:14:38 GMT 2025 - 5.9K bytes - Click Count (0)