Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for readUTime (0.5 sec)

  1. src/test/java/jcifs/internal/util/SMBUtilTest.java

            for (long time : testTimes) {
                SMBUtil.writeUTime(time, buffer, 0);
                long readTime = SMBUtil.readUTime(buffer, 0);
    
                // Account for precision loss (milliseconds to seconds conversion)
                assertEquals((time / 1000L) * 1000L, readTime);
            }
        }
    
        @Test
        void testBoundaryConditions() {
            byte[] buffer = new byte[16];
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.1K bytes
    - Viewed (0)
  2. src/test/java/jcifs/smb1/smb1/SmbComQueryInformationResponseTest.java

            // Should read 20 bytes as per implementation
            assertEquals(20, bytesRead);
            assertEquals(0x0010, response.getAttributes());
            // getLastWriteTime returns lastWriteTime (from readUTime) + serverTimeZoneOffset
            // readUTime multiplies the seconds value by 1000, and writeUTime divides milliseconds by 1000
            // So the round-trip should preserve the milliseconds value
    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/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/SmbComOpenAndXResponse.java

            final int start = bufferIndex;
    
            fid = readInt2(buffer, bufferIndex);
            bufferIndex += 2;
            fileAttributes = readInt2(buffer, bufferIndex);
            bufferIndex += 2;
            lastWriteTime = readUTime(buffer, bufferIndex);
            bufferIndex += 4;
            dataSize = readInt4(buffer, bufferIndex);
            bufferIndex += 4;
            grantedAccess = readInt2(buffer, bufferIndex);
            bufferIndex += 2;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 2.7K bytes
    - Viewed (0)
  5. src/main/java/jcifs/internal/smb1/com/SmbComQueryInformationResponse.java

            if (this.wordCount == 0) {
                return 0;
            }
            this.fileAttributes = SMBUtil.readInt2(buffer, bufferIndex);
            bufferIndex += 2;
            this.lastWriteTime = SMBUtil.readUTime(buffer, bufferIndex);
            bufferIndex += 4;
            this.fileSize = SMBUtil.readInt4(buffer, bufferIndex);
            return 20;
        }
    
        @Override
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 3.6K bytes
    - Viewed (0)
  6. src/test/java/jcifs/smb1/smb1/ServerMessageBlockTest.java

            try {
                TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
                ServerMessageBlock.writeUTime(unixTime * 1000L, buffer, 0);
                long readTime = ServerMessageBlock.readUTime(buffer, 0);
                assertEquals(unixTime * 1000L, readTime);
            } finally {
                TimeZone.setDefault(original);
            }
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.9K bytes
    - Viewed (0)
  7. src/main/java/jcifs/internal/smb1/com/SmbComOpenAndXResponse.java

            this.fid = SMBUtil.readInt2(buffer, bufferIndex);
            bufferIndex += 2;
            this.fileAttributes = SMBUtil.readInt2(buffer, bufferIndex);
            bufferIndex += 2;
            this.lastWriteTime = SMBUtil.readUTime(buffer, bufferIndex);
            bufferIndex += 4;
            this.fileDataSize = SMBUtil.readInt4(buffer, bufferIndex);
            bufferIndex += 4;
            this.grantedAccess = SMBUtil.readInt2(buffer, bufferIndex);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 5.8K bytes
    - Viewed (0)
  8. src/main/java/jcifs/internal/util/SMBUtil.java

         * @param buffer the source byte array
         * @param bufferIndex the starting index in the source array
         * @return the time value in milliseconds since January 1, 1970 UTC
         */
        public static long readUTime(final byte[] buffer, final int bufferIndex) {
            return (readInt4(buffer, bufferIndex) & 0xFFFFFFFFL) * 1000L;
        }
    
        /**
         * Writes a Java time value as a Unix time (32-bit seconds)
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 8K bytes
    - Viewed (0)
  9. src/main/java/jcifs/smb1/smb1/ServerMessageBlock.java

            if (t != 0L) {
                t = (t + MILLISECONDS_BETWEEN_1970_AND_1601) * 10000L;
            }
            writeInt8(t, dst, dstIndex);
        }
    
        static long readUTime(final byte[] buffer, final int bufferIndex) {
            return readInt4(buffer, bufferIndex) * 1000L;
        }
    
        static void writeUTime(long t, final byte[] dst, final int dstIndex) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 19.7K bytes
    - Viewed (0)
  10. src/main/java/jcifs/internal/fscc/FileBasicInfo.java

            final int start = bufferIndex;
            this.createTime = 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: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 4.7K bytes
    - Viewed (0)
Back to top