Class MsDataTypes

java.lang.Object
com.hierynomus.msdtyp.MsDataTypes

public class MsDataTypes extends Object
Utility class that can read and write data types from the [MS-DTYP].pdf specification document from buffers.
  • Constructor Details

    • MsDataTypes

      private MsDataTypes()
  • Method Details

    • putGuid

      public static void putGuid(UUID guid, Buffer<?> buffer)
      [MS-DTYP].pdf 2.3.4.2 GUID Packet representation
      Parameters:
      guid - The GUID to write.
    • readGuid

      public static UUID readGuid(Buffer<?> buffer) throws Buffer.BufferException
      [MS-DTYP].pdf 2.3.4.2 GUID Packet representation
      Returns:
      The GUID read from the buffer
      Throws:
      Buffer.BufferException - If an underflow occurs by reading the GUID (less than 16 bytes available).
    • readFileTime

      public static FileTime readFileTime(Buffer<?> buffer) throws Buffer.BufferException
      [MS-DTYP].pdf 2.3.3 FILETIME
      Returns:
      a Date converted from the Windows FILETIME stored in the buffer
      Throws:
      Buffer.BufferException - If an underflow occurs by reading the FILETIME (less than 8 bytes available).
    • putFileTime

      public static void putFileTime(FileTime fileTime, Buffer<?> buffer)
      [MS-DTYP].pdf 2.3.3 FILETIME

      store Date into FileTime in the buffer

    • nowAsFileTime

      public static long nowAsFileTime()
      A 64-bit unsigned integer that contains the current system time, represented as the number of 100 nanosecond ticks elapsed since midnight of January 1, 1601 (UTC)