- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 29 for writeUTime (0.59 seconds)
-
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")Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 4.8K bytes - Click Count (0) -
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]);
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 18.1K bytes - Click Count (0) -
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; } @OverrideCreated: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 07:14:38 GMT 2025 - 1.8K bytes - Click Count (0) -
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
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 5.5K bytes - Click Count (0) -
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.
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 6.4K bytes - Click Count (0) -
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' */Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 16 01:32:48 GMT 2025 - 8K bytes - Click Count (0) -
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
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 07:14:38 GMT 2025 - 19.7K bytes - Click Count (0) -
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; }Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 16 01:32:48 GMT 2025 - 11.9K bytes - Click Count (0) -
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);
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 11.9K bytes - Click Count (0) -
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() {Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 11.1K bytes - Click Count (0)