Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for writeUTime (0.05 sec)

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

        }
    
        /**
         * Verify that writeParameterWordsWireFormat writes the file id and the
         * unsigned time correctly.  The last write time is zero which should be
         * encoded as four 0xFF bytes by {@code writeUTime}.
         */
        @ParameterizedTest(name = "fid={0}, lastWriteTime={1}")
        @MethodSource("validParams")
        @DisplayName("happy: writeParameterWordsWireFormat writes correct bytes")
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.8K bytes
    - Viewed (0)
  2. src/test/java/jcifs/smb1/smb1/SmbComQueryInformationResponseTest.java

            buffer[1] = 0x00;
            // Last Write Time (UTime): A sample timestamp in milliseconds
            long sampleTimeMillis = 1672531200000L; // Represents a specific date in milliseconds
            ServerMessageBlock.writeUTime(sampleTimeMillis, buffer, 2);
            // File Size: 1024 bytes
            ServerMessageBlock.writeInt4(1024, buffer, 6);
    
            response.wordCount = 10; // Must be non-zero to read
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.5K bytes
    - Viewed (0)
  3. src/main/java/jcifs/internal/smb1/com/SmbComSetInformation.java

        protected int writeParameterWordsWireFormat(final byte[] dst, int dstIndex) {
            final int start = dstIndex;
            SMBUtil.writeInt2(this.fileAttributes, dst, dstIndex);
            dstIndex += 2;
            SMBUtil.writeUTime(this.lastWriteTime, dst, dstIndex);
            dstIndex += 4;
            // reserved
            dstIndex += 10;
            return dstIndex - start;
        }
    
        @Override
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 3K bytes
    - Viewed (0)
  4. src/main/java/jcifs/smb1/smb1/SmbComClose.java

            command = SMB_COM_CLOSE;
        }
    
        @Override
        int writeParameterWordsWireFormat(final byte[] dst, int dstIndex) {
            writeInt2(fid, dst, dstIndex);
            dstIndex += 2;
            writeUTime(lastWriteTime, dst, dstIndex);
            return 6;
        }
    
        @Override
        int writeBytesWireFormat(final byte[] dst, final int dstIndex) {
            return 0;
        }
    
        @Override
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 1.8K bytes
    - Viewed (0)
  5. src/main/java/jcifs/internal/smb1/com/SmbComClose.java

        protected int writeParameterWordsWireFormat(final byte[] dst, int dstIndex) {
            SMBUtil.writeInt2(this.fid, dst, dstIndex);
            dstIndex += 2;
            if (this.digest != null) {
                SMB1SigningDigest.writeUTime(getConfig(), this.lastWriteTime, dst, dstIndex);
            } else {
                log.trace("SmbComClose without a digest");
            }
            return 6;
        }
    
        @Override
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 3.4K bytes
    - Viewed (0)
  6. src/main/java/jcifs/internal/util/SMBUtil.java

         * @param t the time value in milliseconds since January 1, 1970 UTC
         * @param dst the destination byte array
         * @param dstIndex the starting index in the destination array
         */
        public static void writeUTime(final long t, final byte[] dst, final int dstIndex) {
            writeInt4(t / 1000, dst, dstIndex);
        }
    
        /**
         * SMB1 protocol header template with magic number 0xFF 'SMB'
         */
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 8K bytes
    - Viewed (0)
  7. src/test/java/jcifs/internal/smb1/com/SmbComCloseTest.java

            assertEquals(6, bytesWritten);
            assertEquals(fid, SMBUtil.readInt2(dst, 0));
            // With a digest, the lastWriteTime should be written.
            // We can't verify the exact bytes without a real implementation of writeUTime,
            // but we can check that it's not zero.
            long writtenTime = SMBUtil.readInt4(dst, 2) & 0xFFFFFFFFL;
            // This is a weak check, but better than nothing.
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 6.4K bytes
    - Viewed (0)
  8. src/main/java/jcifs/internal/fscc/FileBasicInfo.java

            final int start = dstIndex;
            SMBUtil.writeTime(this.createTime, dst, dstIndex);
            dstIndex += 8;
            SMBUtil.writeTime(this.lastAccessTime, dst, dstIndex);
            dstIndex += 8;
            SMBUtil.writeTime(this.lastWriteTime, dst, dstIndex);
            dstIndex += 8;
            SMBUtil.writeTime(this.changeTime, dst, dstIndex);
            dstIndex += 8;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 4.7K bytes
    - Viewed (0)
  9. src/main/java/jcifs/smb1/smb1/Trans2SetFileInformation.java

        }
    
        @Override
        int writeDataWireFormat(final byte[] dst, int dstIndex) {
            final int start = dstIndex;
    
            writeTime(createTime, dst, dstIndex);
            dstIndex += 8;
            writeInt8(0L, dst, dstIndex);
            dstIndex += 8;
            writeTime(lastWriteTime, dst, dstIndex);
            dstIndex += 8;
            writeInt8(0L, dst, dstIndex);
            dstIndex += 8;
            /* Samba 2.2.7 needs ATTR_NORMAL
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 3.3K bytes
    - Viewed (0)
  10. src/test/java/jcifs/smb1/smb1/Trans2FindFirst2ResponseTest.java

            // Entry 1
            writeInt4(120, buffer, bufferIndex); // nextEntryOffset = 120 (relative)
            writeInt4(1, buffer, bufferIndex + 4); // fileIndex = 1
            writeTime(1672531200000L, buffer, bufferIndex + 8); // creationTime
            writeTime(1672617600000L, buffer, bufferIndex + 24); // lastWriteTime
            writeInt8(2048, buffer, bufferIndex + 40); // endOfFile
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.3K bytes
    - Viewed (0)
Back to top