- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 100 for alignment (0.09 sec)
-
src/test/java/jcifs/smb1/smb1/ServerMessageBlockTest.java
String testString = "Aligned Unicode"; byte[] buffer = new byte[testString.length() * 2 + 2 + 1]; // +1 for alignment int len = smb.writeString(testString, buffer, 1); // When dstIndex=1 and headerStart=1, (1-1)%2=0, no alignment padding needed // Length is string bytes (15*2) + 2 null terminators = 32 assertEquals(testString.length() * 2 + 2, len);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 9.9K bytes - Viewed (0) -
src/main/java/jcifs/internal/smb2/persistent/DurableHandleRequest.java
} @Override public byte[] getName() { return CONTEXT_NAME_BYTES; } @Override public int size() { // Context header (16) + name length (4) + padding to 8-byte alignment + data (16) return 16 + 4 + 4 + STRUCTURE_SIZE; } @Override public int encode(byte[] dst, int dstIndex) { int start = dstIndex; // Write context header
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 21 04:51:33 UTC 2025 - 2.6K bytes - Viewed (0) -
src/main/java/jcifs/internal/smb2/ServerMessageBlock2Request.java
final int exp = size(); final int actual = getLength(); if (exp != actual) { // Log the size mismatch for debugging but don't throw exception // This can occur due to padding alignment differences between size8() and pad8() if (log.isDebugEnabled()) { log.debug("Size calculation mismatch: expected {} but got {} (difference: {})", exp, actual, actual - exp); }
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Mon Aug 25 14:34:10 UTC 2025 - 7.2K bytes - Viewed (0) -
src/main/java/jcifs/internal/smb2/persistent/DurableHandleReconnect.java
*/ public byte[] getFileId() { return Arrays.copyOf(fileId, 16); } @Override public int size() { // Context header (16) + name length (4) + padding to 8-byte alignment + data (16) return 16 + 4 + 4 + STRUCTURE_SIZE; } @Override public int encode(byte[] dst, int dstIndex) { int start = dstIndex; // Write context header
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 21 04:51:33 UTC 2025 - 3K bytes - Viewed (0) -
src/main/java/jcifs/smb1/smb1/Trans2SetFileInformation.java
writeInt2(0x80 | attributes, dst, dstIndex); dstIndex += 2; /* 6 zeros observed with NT */ writeInt8(0L, dst, dstIndex); dstIndex += 6; /* Also observed 4 byte alignment but we stick * with the default for jCIFS which is 2 */ return dstIndex - start; } @Override int readSetupWireFormat(final byte[] buffer, final int bufferIndex, final int len) {
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 3.3K bytes - Viewed (0) -
src/main/java/jcifs/smb1/smb1/ServerMessageBlock.java
int writeString(final String str, final byte[] dst, int dstIndex, final boolean useUnicode) { final int start = dstIndex; try { if (useUnicode) { // Unicode requires word alignment if ((dstIndex - headerStart) % 2 != 0) { dst[dstIndex++] = (byte) '\0'; } System.arraycopy(str.getBytes(UNI_ENCODING), 0, dst, dstIndex, str.length() * 2);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 19.7K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/tree/Smb2TreeDisconnectRequestTest.java
request.writeBytesWireFormat(buffer, 10); // Then - verify reserved field is zero assertEquals(0, SMBUtil.readInt2(buffer, 12)); } @Test @DisplayName("Should verify size8 alignment") void testSize8Alignment() throws Exception { // Given Configuration mockConfig = mock(Configuration.class); Smb2TreeDisconnectRequest request = new Smb2TreeDisconnectRequest(mockConfig);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 14.1K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/lock/Smb2LockRequestTest.java
int expectedSize = Smb2Constants.SMB2_HEADER_LENGTH + 24 + 24; // header + structure + 1 lock expectedSize = ((expectedSize + 7) / 8) * 8; // 8-byte alignment assertEquals(expectedSize, req.size()); } @Test @DisplayName("Should calculate size correctly with multiple locks") void testSizeWithMultipleLocks() {
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 25.3K bytes - Viewed (0) -
src/test/java/jcifs/smb/WinErrorTest.java
} @Test @DisplayName("Arrays: non-null, same length, and exact contents") void arrays_are_well_formed_and_match() { // Validate arrays existence and alignment (edge and structure checks) assertNotNull(WinError.WINERR_CODES, "WINERR_CODES should not be null"); assertNotNull(WinError.WINERR_MESSAGES, "WINERR_MESSAGES should not be null");
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 8.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/hash/AbstractStreamingHasherTest.java
* process it; all should produce the same answer, the only difference should be the number of * process()/processRemaining() invocations, due to alignment. */ @AndroidIncompatible // slow. TODO(cpovirk): Maybe just reduce iterations under Android. public void testExhaustive() throws Exception {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 17:27:14 UTC 2025 - 8.5K bytes - Viewed (0)