- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 117 for aligned (0.74 sec)
-
src/test/java/jcifs/internal/smb2/nego/Smb2NegotiateRequestTest.java
// When int size = request.size(); // Then - should include context sizes assertTrue(size > 112); // Bigger than without contexts assertEquals(0, size % 8); // Should be 8-byte aligned } @Test @DisplayName("Should write bytes to wire format correctly") void testWriteBytesWireFormat() { // GivenRegistered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 20.7K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/notify/Smb2ChangeNotifyResponseTest.java
SMBUtil.writeInt4(28, buffer, notifyOffset); // NextEntryOffset (aligned) SMBUtil.writeInt4(1, buffer, notifyOffset + 4); SMBUtil.writeInt4(6, buffer, notifyOffset + 8); // 6 bytes filename System.arraycopy("abc".getBytes("UnicodeLittleUnmarked"), 0, buffer, notifyOffset + 12, 6); // Second notification starts at aligned offset notifyOffset = 108; // 80 + 28
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Sun Aug 31 08:00:57 UTC 2025 - 18.8K bytes - Viewed (0) -
src/main/java/jcifs/internal/smb2/ServerMessageBlock2.java
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Sun Aug 31 08:00:57 UTC 2025 - 24K bytes - Viewed (0) -
src/main/java/jcifs/internal/dfs/Referral.java
} return this.size; } private static String readString(final byte[] buffer, int bufferIndex, final int len) { // this is not absolutely correct, but we assume that the header is aligned if (bufferIndex % 2 != 0) { bufferIndex++; } return Strings.fromUNIBytes(buffer, bufferIndex, Strings.findUNITermination(buffer, bufferIndex, len)); } @OverrideRegistered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Sat Aug 16 01:32:48 UTC 2025 - 7.1K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/session/Smb2SessionSetupRequestTest.java
} @Test @DisplayName("Should verify padding calculation") void testPaddingCalculation() throws Exception { // Given - Create request with token byte[] token = new byte[5]; // Non-8-aligned size Smb2SessionSetupRequest req = new Smb2SessionSetupRequest(mockContext, TEST_SECURITY_MODE, TEST_CAPABILITIES, TEST_PREVIOUS_SESSION_ID, token); // Use reflection to access pad8 methodRegistered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 21.2K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/notify/Smb2ChangeNotifyRequestTest.java
void testSize() { // When int size = request.size(); // Then // Size should be aligned to 8 bytes: SMB2_HEADER_LENGTH + 32 int expectedSize = Smb2Constants.SMB2_HEADER_LENGTH + 32; // The size8 method aligns to 8-byte boundary int alignedSize = (expectedSize + 7) & ~7; assertEquals(alignedSize, size); } @Test
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 17.1K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/Smb2EchoRequestTest.java
assertEquals(size1, size2); } @Test @DisplayName("Size should be 72 bytes (64 header + 4 body aligned to 8)") void testExactSize() { // SMB2_HEADER_LENGTH = 64, body = 4, total = 68 // size8 aligns to 8-byte boundary: (68 + 7) & ~7 = 72 assertEquals(72, echoRequest.size()); } } @NestedRegistered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11.3K bytes - Viewed (0) -
src/test/java/jcifs/smb1/smb1/ServerMessageBlockTest.java
@Test void testStringReadWriteUnicodeWithOddAlignment() throws UnsupportedEncodingException { smb.useUnicode = true; smb.headerStart = 1; // Make the start odd String testString = "Aligned Unicode"; byte[] buffer = new byte[testString.length() * 2 + 2 + 1]; // +1 for alignment int len = smb.writeString(testString, buffer, 1);Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 9.9K bytes - Viewed (0) -
src/test/java/jcifs/internal/dfs/ReferralTest.java
bb.putShort((short) 0); // altPathOffset bb.putShort((short) 0); // nodeOffset // Path string at offset 23 (which should be aligned to 24) bb.position(24); // Aligned position String path = "\\\\test"; bb.put(path.getBytes(StandardCharsets.UTF_16LE)); bb.putShort((short) 0); // Decode from position 1
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 22K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/create/CreateContextRequestTest.java
int encodedSize = req.encode(buffer, 0); // Verify 8-byte alignment assertEquals(0, encodedSize % 8, "Encoded size should be 8-byte aligned for name length " + nameLen); } } @ParameterizedTest @ValueSource(ints = { 0, 10, 50, 100, 200 }) @DisplayName("Should handle various buffer offsets")
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 24.9K bytes - Viewed (0)