Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 21 for fileSize (0.06 sec)

  1. src/test/java/jcifs/pac/PacDataInputStreamTest.java

            long time = System.currentTimeMillis();
            BigInteger filetime = BigInteger.valueOf(time)
                    .add(BigInteger.valueOf(SmbConstants.MILLISECONDS_BETWEEN_1970_AND_1601))
                    .multiply(BigInteger.valueOf(10000L));
    
            byte[] data = new byte[8];
            long low = filetime.longValue();
            long high = filetime.shiftRight(32).longValue();
    
            // write little-endian
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 9.2K bytes
    - Viewed (0)
  2. src/test/java/jcifs/pac/PacLogonInfoTest.java

        }
    
        @Test
        @DisplayName("Test date conversion from FILETIME")
        void testFiletimeConversion() throws Exception {
            // Test the FILETIME conversion logic
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            DataOutputStream dos = new DataOutputStream(baos);
    
            // Write a known FILETIME value
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.3K bytes
    - Viewed (0)
  3. src/main/java/jcifs/internal/util/SMBUtil.java

            dst[++dstIndex] = (byte) (val >>= 8);
            dst[++dstIndex] = (byte) (val >>= 8);
            dst[++dstIndex] = (byte) (val >> 8);
        }
    
        /**
         * Reads a Windows FILETIME value and converts it to Java time in milliseconds
         * @param src the source byte array
         * @param srcIndex the starting index in the source array
         * @return the time value in milliseconds since January 1, 1970 UTC
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 8K bytes
    - Viewed (0)
  4. src/main/java/jcifs/ntlmssp/av/AvTimestamp.java

            super(AvPair.MsvAvTimestamp, raw);
        }
    
        /**
         * Constructs an AvTimestamp with the specified timestamp value
         *
         * @param ts the timestamp value in Windows FILETIME format
         */
        public AvTimestamp(final long ts) {
            this(encode(ts));
        }
    
        /**
         * @param ts
         * @return
         */
        private static byte[] encode(final long ts) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 1.9K bytes
    - Viewed (0)
  5. src/test/java/jcifs/smb1/smb1/ServerMessageBlockTest.java

            byte[] buffer = new byte[8];
            ServerMessageBlock.writeTime(0, buffer, 0);
            // When zero is written, it stays as zero in buffer
            // When read back, it converts to negative Unix time due to Windows FileTime conversion
            long expectedTime = -SmbConstants.MILLISECONDS_BETWEEN_1970_AND_1601;
            assertEquals(expectedTime, ServerMessageBlock.readTime(buffer, 0));
        }
    
        @Test
        void testUTimeReadWrite() {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.9K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/smb2/create/Smb2CloseResponseTest.java

                int bytesRead = response.readBytesWireFormat(buffer, 0);
    
                // Then
                assertEquals(60, bytesRead);
                assertEquals(0, response.getCloseFlags());
                // Zero Windows FileTime converts to negative Unix time
                long expectedTime = -SmbConstants.MILLISECONDS_BETWEEN_1970_AND_1601;
                assertEquals(expectedTime, response.getCreationTime());
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 26.9K bytes
    - Viewed (0)
  7. src/main/java/jcifs/internal/witness/WitnessAsyncNotifyMessage.java

        /**
         * Decodes a resource change notification message.
         */
        private void decodeResourceChangeMessage(NdrBuffer buf, WitnessNotificationMessage message) throws NdrException {
            // Timestamp (FILETIME - 64-bit)
            long timestamp = buf.dec_ndr_hyper();
            message.setTimestamp(timestamp);
    
            // Resource name
            String resourceName = decodeWideStringPointer(buf);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 24 00:12:28 UTC 2025
    - 16.4K bytes
    - Viewed (0)
  8. src/main/java/jcifs/internal/witness/WitnessHeartbeatMessage.java

            // Response sequence number (64-bit)
            responseSequenceNumber = buf.dec_ndr_hyper();
    
            // Heartbeat interval (64-bit, in 100-nanosecond intervals)
            // Convert from FILETIME intervals to milliseconds
            long filetimeInterval = buf.dec_ndr_hyper();
            heartbeatInterval = filetimeInterval / 10000; // Convert to milliseconds
        }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 23 09:06:40 UTC 2025
    - 5.8K bytes
    - Viewed (0)
  9. src/test/java/jcifs/internal/fscc/FileBasicInfoTest.java

            // 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
            assertEquals(expectedTime, decoded.getCreateTime());
            assertEquals(expectedTime, decoded.getLastAccessTime());
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.5K bytes
    - Viewed (0)
  10. src/test/java/jcifs/internal/fscc/BasicFileInformationTest.java

            // Given
            byte[] buffer = new byte[64];
            int bufferIndex = 8;
    
            // Prepare test data in buffer (40 bytes of data)
            // 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);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 13K bytes
    - Viewed (0)
Back to top