Class MsDataTypes


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

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      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)
      static void putFileTime​(FileTime fileTime, Buffer<?> buffer)
      [MS-DTYP].pdf 2.3.3 FILETIME
      static void putGuid​(java.util.UUID guid, Buffer<?> buffer)
      [MS-DTYP].pdf 2.3.4.2 GUID Packet representation
      static FileTime readFileTime​(Buffer<?> buffer)
      [MS-DTYP].pdf 2.3.3 FILETIME
      static java.util.UUID readGuid​(Buffer<?> buffer)
      [MS-DTYP].pdf 2.3.4.2 GUID Packet representation
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • putGuid

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

        public static java.util.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)