Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 228 for readInt2 (0.06 sec)

  1. src/main/java/jcifs/internal/smb2/info/Smb2QueryDirectoryResponse.java

            final int structureSize = SMBUtil.readInt2(buffer, bufferIndex);
    
            if (structureSize != 9) {
                throw new SMBProtocolDecodingException("Expected structureSize = 9");
            }
    
            final int bufferOffset = SMBUtil.readInt2(buffer, bufferIndex + 2) + getHeaderStart();
            bufferIndex += 4;
            final int bufferLength = SMBUtil.readInt4(buffer, bufferIndex);
            bufferIndex += 4;
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 4.1K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/smb1/net/NetShareEnumTest.java

            }
            offset += descrBytes.length;
    
            // 3. Level (2 bytes)
            assertEquals(0x0001, SMBUtil.readInt2(dst, offset));
            offset += 2;
    
            // 4. MaxDataCount (2 bytes)
            int maxDataCount = SMBUtil.readInt2(dst, offset);
            assertTrue(maxDataCount > 0);
            offset += 2;
    
            // Verify total bytes written
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.8K bytes
    - Viewed (0)
  3. src/main/java/jcifs/smb1/smb1/SmbComQueryInformationResponse.java

            if (wordCount == 0) {
                return 0;
            }
            fileAttributes = readInt2(buffer, bufferIndex);
            bufferIndex += 2;
            lastWriteTime = readUTime(buffer, bufferIndex);
            bufferIndex += 4;
            fileSize = readInt4(buffer, bufferIndex);
            return 20;
        }
    
        @Override
        int readBytesWireFormat(final byte[] buffer, final int bufferIndex) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 2.7K bytes
    - Viewed (0)
  4. src/main/java/jcifs/smb1/smb1/Trans2QueryPathInformationResponse.java

            final SmbQueryFileStandardInfo info = new SmbQueryFileStandardInfo();
            info.allocationSize = readInt8(buffer, bufferIndex);
            bufferIndex += 8;
            info.endOfFile = readInt8(buffer, bufferIndex);
            bufferIndex += 8;
            info.numberOfLinks = readInt4(buffer, bufferIndex);
            bufferIndex += 4;
            info.deletePending = (buffer[bufferIndex] & 0xFF) > 0;
            bufferIndex++;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 5.6K bytes
    - Viewed (0)
  5. src/test/java/jcifs/internal/smb1/com/SmbComCloseTest.java

            // Then
            assertEquals(6, bytesWritten);
            assertEquals(fid, SMBUtil.readInt2(dst, 0));
            // lastWriteTime is not written if digest is null, so the remaining bytes should be zero
            assertEquals(0, SMBUtil.readInt4(dst, 2));
        }
    
        /**
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 6.4K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/smb2/session/Smb2LogoffResponseTest.java

                // Assert: message is meaningful
                assertEquals("Structure size is not 4", ex.getMessage());
            }
    
            @Test
            @DisplayName("Null buffer leads to NullPointerException from readInt2")
            void nullBuffer_throwsNPE() {
                // Arrange
                Smb2LogoffResponse resp = newResponse();
    
                // Act & Assert
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.7K bytes
    - Viewed (0)
  7. src/main/java/jcifs/smb1/netbios/SessionServicePacket.java

            dst[dstIndex++] = (byte) (val >> 8 & 0xFF);
            dst[dstIndex] = (byte) (val & 0xFF);
        }
    
        static int readInt2(final byte[] src, final int srcIndex) {
            return ((src[srcIndex] & 0xFF) << 8) + (src[srcIndex + 1] & 0xFF);
        }
    
        static int readInt4(final byte[] src, final int srcIndex) {
            return ((src[srcIndex] & 0xFF) << 24) + ((src[srcIndex + 1] & 0xFF) << 16) + ((src[srcIndex + 2] & 0xFF) << 8)
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 5.2K bytes
    - Viewed (0)
  8. src/main/java/jcifs/internal/smb2/create/LeaseV2CreateContextResponse.java

            this.leaseKey = new Smb2LeaseKey(keyBytes);
            bufferIndex += 16;
    
            this.leaseState = SMBUtil.readInt4(buffer, bufferIndex);
            bufferIndex += 4;
    
            this.leaseFlags = SMBUtil.readInt4(buffer, bufferIndex);
            bufferIndex += 4;
    
            // LeaseDuration (8 bytes) - reserved, skip
            bufferIndex += 8;
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 23 02:21:31 UTC 2025
    - 3.6K bytes
    - Viewed (0)
  9. src/main/java/jcifs/netbios/SessionRetargetResponsePacket.java

                throw new IOException("unexpected EOF reading netbios retarget session response");
            }
            final int addr = readInt4(buffer, bufferIndex);
            bufferIndex += 4;
            new NbtAddress(null, addr, false, NbtAddress.B_NODE);
            readInt2(buffer, bufferIndex);
            return this.length;
        }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 1.7K bytes
    - Viewed (0)
  10. src/test/java/jcifs/internal/smb2/info/Smb2QueryInfoRequestTest.java

                assertEquals(0, SMBUtil.readInt2(buffer, 72));
    
                // Verify input buffer length (should be 0 when no input buffer)
                assertEquals(0, SMBUtil.readInt4(buffer, 76));
    
                // Verify additional information
                assertEquals(0x12345678, SMBUtil.readInt4(buffer, 80));
    
                // Verify query flags
                assertEquals(0xABCDEF00, SMBUtil.readInt4(buffer, 84));
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 22.6K bytes
    - Viewed (0)
Back to top