Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for writeUTime (0.21 sec)

  1. src/test/java/jcifs/internal/smb1/SMB1SigningDigestTest.java

            assertTrue(result.contains("0102030405060708090A0B0C0D0E0F10"));
        }
    
        @Test
        @DisplayName("Test writeUTime with zero time")
        void testWriteUTimeWithZeroTime() {
            byte[] dst = new byte[4];
    
            SMB1SigningDigest.writeUTime(mockConfig, 0L, dst, 0);
    
            assertEquals((byte) 0xFF, dst[0]);
            assertEquals((byte) 0xFF, dst[1]);
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.1K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/smb1/com/SmbComQueryInformationResponseTest.java

            long lastWriteTime = System.currentTimeMillis();
            int fileSize = 12345678;
    
            SMBUtil.writeInt2(fileAttributes, buffer, bufferIndex);
            SMBUtil.writeUTime(lastWriteTime, buffer, bufferIndex + 2);
            SMBUtil.writeInt4(fileSize, buffer, bufferIndex + 6);
    
            // Read the data
            int bytesRead = response.readParameterWordsWireFormat(buffer, bufferIndex);
    
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.9K bytes
    - Viewed (0)
  3. src/test/java/jcifs/internal/util/SMBUtilTest.java

        @Test
        void testWriteUTime() {
            byte[] dst = new byte[8];
    
            // Test with zero
            SMBUtil.writeUTime(0L, dst, 0);
            assertEquals(0, SMBUtil.readInt4(dst, 0));
    
            // Test with specific value (Unix timestamp in milliseconds)
            SMBUtil.writeUTime(1500000000000L, dst, 4);
            assertEquals(1500000000, SMBUtil.readInt4(dst, 4));
        }
    
        @Test
        void testSMBHeader() {
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.1K bytes
    - Viewed (0)
  4. src/main/java/jcifs/internal/smb1/SMB1SigningDigest.java

         * @param dst
         *            The destination byte array
         * @param dstIndex
         *            The starting index in the destination array
         */
        public static void writeUTime(final Configuration cfg, long t, final byte[] dst, final int dstIndex) {
            if (t == 0L || t == 0xFFFFFFFFFFFFFFFFL) {
                SMBUtil.writeInt4(0xFFFFFFFF, dst, dstIndex);
                return;
            }
    
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 11.9K bytes
    - Viewed (0)
  5. src/main/java/jcifs/smb1/smb1/ServerMessageBlock.java

            return readInt4(buffer, bufferIndex) * 1000L;
        }
    
        static void writeUTime(long t, final byte[] dst, final int dstIndex) {
            if (t == 0L || t == 0xFFFFFFFFFFFFFFFFL) {
                writeInt4(0xFFFFFFFF, dst, dstIndex);
                return;
            }
            synchronized (TZ) {
                if (TZ.inDaylightTime(new Date())) {
                    // in DST
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 19.7K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/fscc/FileBothDirectoryInfoTest.java

            long maxTime = System.currentTimeMillis() + 1000000000000L;
            SMBUtil.writeTime(maxTime, buffer, 8); // creationTime
            SMBUtil.writeTime(maxTime, buffer, 16); // lastAccessTime
            SMBUtil.writeTime(maxTime, buffer, 24); // lastWriteTime
            SMBUtil.writeTime(maxTime, buffer, 32); // changeTime
            SMBUtil.writeInt8(Long.MAX_VALUE, buffer, 40); // endOfFile
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.9K bytes
    - Viewed (0)
  7. src/test/java/jcifs/internal/fscc/BasicFileInformationTest.java

            // Use SMBUtil to properly encode times in Windows FILETIME format
            SMBUtil.writeTime(TEST_CREATE_TIME, buffer, bufferIndex);
            SMBUtil.writeTime(TEST_LAST_ACCESS_TIME, buffer, bufferIndex + 8);
            SMBUtil.writeTime(TEST_LAST_WRITE_TIME, buffer, bufferIndex + 16);
            SMBUtil.writeTime(TEST_CHANGE_TIME, buffer, bufferIndex + 24);
            SMBUtil.writeInt4(TEST_ATTRIBUTES, buffer, bufferIndex + 32);
    
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 13K bytes
    - Viewed (0)
  8. src/test/java/jcifs/internal/smb2/create/Smb2CreateResponseTest.java

            SMBUtil.writeInt4(createAction, body, i); // CreateAction
            i += 4;
    
            SMBUtil.writeTime(ctime, body, i); // CreationTime
            i += 8;
            SMBUtil.writeTime(atime, body, i); // LastAccessTime
            i += 8;
            SMBUtil.writeTime(mtime, body, i); // LastWriteTime
            i += 8;
            SMBUtil.writeTime(chtime, body, i); // ChangeTime
            i += 8;
    
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.5K bytes
    - Viewed (0)
  9. src/test/java/jcifs/internal/smb2/nego/Smb2NegotiateResponseTest.java

            // Max write size
            SMBUtil.writeInt4(1048576, buffer, offset + 36);
    
            // System time
            SMBUtil.writeTime(System.currentTimeMillis(), buffer, offset + 40);
    
            // Server start time
            SMBUtil.writeTime(System.currentTimeMillis() - 3600000, buffer, offset + 48);
    
            // Security buffer offset and length
            SMBUtil.writeInt2(128, buffer, offset + 56); // Offset
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 32.5K bytes
    - Viewed (0)
  10. src/test/java/jcifs/internal/smb2/create/Smb2CloseResponseTest.java

                long lastWriteTimeMs = creationTimeMs + 200;
    
                // Write as Windows FileTime format
                SMBUtil.writeTime(creationTimeMs, buffer, 8);
                SMBUtil.writeTime(lastAccessTimeMs, buffer, 16);
                SMBUtil.writeTime(lastWriteTimeMs, buffer, 24);
                SMBUtil.writeTime(creationTimeMs + 300, buffer, 32);
                SMBUtil.writeInt8(4096, buffer, 40);
                SMBUtil.writeInt8(2048, buffer, 48);
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 26.9K bytes
    - Viewed (0)
Back to top