Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 38 for readTime (0.31 sec)

  1. src/test/java/jcifs/smb1/smb1/ServerMessageBlockTest.java

            byte[] buffer = new byte[8];
            long time = System.currentTimeMillis();
            ServerMessageBlock.writeTime(time, buffer, 0);
            long readTime = ServerMessageBlock.readTime(buffer, 0);
            // Precision may be lost, so check within a second
            assertTrue(Math.abs(time - readTime) < 1000);
        }
    
        @Test
        void testTimeReadWriteZero() {
            byte[] buffer = new byte[8];
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.9K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/util/SMBUtilTest.java

            SMBUtil.writeInt8(0L, src, 0);
            long time = SMBUtil.readTime(src, 0);
            assertEquals(-SmbConstants.MILLISECONDS_BETWEEN_1970_AND_1601, time);
    
            // Test with specific time value
            long testTime = 131768928000000000L; // Example Windows file time
            SMBUtil.writeInt8(testTime, src, 8);
            long readTime = SMBUtil.readTime(src, 8);
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.1K bytes
    - Viewed (0)
  3. src/main/java/jcifs/internal/smb2/create/Smb2CreateResponse.java

            bufferIndex += 4;
    
            this.creationTime = SMBUtil.readTime(buffer, bufferIndex);
            bufferIndex += 8;
            this.lastAccessTime = SMBUtil.readTime(buffer, bufferIndex);
            bufferIndex += 8;
            this.lastWriteTime = SMBUtil.readTime(buffer, bufferIndex);
            bufferIndex += 8;
            this.changeTime = SMBUtil.readTime(buffer, bufferIndex);
            bufferIndex += 8;
    
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sun Aug 24 00:49:49 UTC 2025
    - 15.4K bytes
    - Viewed (0)
  4. src/test/java/jcifs/internal/smb2/create/Smb2CloseResponseTest.java

                assertEquals(60, bytesRead);
                // SMBUtil.readTime will handle the conversion
                assertEquals(SMBUtil.readTime(buffer, 8), response.getCreationTime());
                assertEquals(SMBUtil.readTime(buffer, 16), response.getLastAccessTime());
                assertEquals(SMBUtil.readTime(buffer, 24), response.getLastWriteTime());
                assertEquals(SMBUtil.readTime(buffer, 32), response.getChangeTime());
            }
    
    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/fscc/BasicFileInformationTest.java

            // Use SMBUtil to read times back properly
            assertEquals(TEST_CREATE_TIME, SMBUtil.readTime(buffer, dstIndex));
            assertEquals(TEST_LAST_ACCESS_TIME, SMBUtil.readTime(buffer, dstIndex + 8));
            assertEquals(TEST_LAST_WRITE_TIME, SMBUtil.readTime(buffer, dstIndex + 16));
            assertEquals(TEST_CHANGE_TIME, SMBUtil.readTime(buffer, dstIndex + 24));
            assertEquals(TEST_ATTRIBUTES, SMBUtil.readInt4(buffer, dstIndex + 32));
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 13K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/smb1/com/SmbComQueryInformationResponseTest.java

            // Verify time was read correctly (accounting for UTime conversion)
            long readTime = (Long) getFieldValue(response, "lastWriteTime");
            // UTime is seconds since 1970, so we need to compare at second precision
            assertEquals(lastWriteTime / 1000, readTime / 1000);
        }
    
        @Test
        void testReadParameterWordsWireFormatWithZeroWordCount() {
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.9K bytes
    - Viewed (0)
  7. src/main/java/jcifs/internal/smb2/nego/Smb2NegotiateResponse.java

                throw new SMBProtocolDecodingException("Buffer too small for timestamps and offsets section");
            }
    
            this.systemTime = SMBUtil.readTime(buffer, bufferIndex);
            bufferIndex += 8;
            this.serverStartTime = SMBUtil.readTime(buffer, bufferIndex);
            bufferIndex += 8;
    
            final int securityBufferOffset = SMBUtil.readInt2(buffer, bufferIndex);
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 24K bytes
    - Viewed (0)
  8. docs/smb3-features/05-rdma-smb-direct-design.md

        try (InputStream is = file.getInputStream()) {
            is.read(readData);
        }
        
        long readTime = System.currentTimeMillis() - start;
        
        assertArrayEquals(data, readData);
        
        // RDMA should be faster than TCP for large transfers
        log.info("RDMA Write: {}ms, Read: {}ms", writeTime, readTime);
    }
    
    @Test
    public void testRdmaFallbackToTcp() throws Exception {
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 16 02:53:50 UTC 2025
    - 35.9K bytes
    - Viewed (0)
  9. src/main/java/jcifs/internal/smb1/com/SmbComNegotiateResponse.java

            bufferIndex += 4;
            this.server.scapabilities = SMBUtil.readInt4(buffer, bufferIndex);
            bufferIndex += 4;
            this.server.serverTime = SMBUtil.readTime(buffer, bufferIndex);
            bufferIndex += 8;
            int tzOffset = SMBUtil.readInt2(buffer, bufferIndex);
            // tzOffset is signed!
            if (tzOffset > Short.MAX_VALUE) {
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 15.8K bytes
    - Viewed (0)
  10. src/test/java/jcifs/internal/fscc/FileBasicInfoTest.java

            FileBasicInfo decoded = new FileBasicInfo();
            decoded.decode(buffer, 0, 36); // decode reads 36 bytes
    
            // Note: When encoding time 0, SMBUtil.writeTime writes 0 directly,
            // but SMBUtil.readTime interprets 0 as Jan 1, 1601 in Unix time (-11644473600000)
            // This is the expected behavior for Windows FILETIME
            long expectedTime = -11644473600000L; // Jan 1, 1601 in Unix time
    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