Skip navigation links
JNA API 4.4.0
com.sun.jna.platform.win32

Class WinBase.FILETIME

  • Direct Known Subclasses:
    WinBase.FILETIME.ByReference
    Enclosing interface:
    WinBase


    public static class WinBase.FILETIME
    extends Structure
    The FILETIME structure is a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (UTC). Conversion code in this class Copyright 2002-2004 Apache Software Foundation.
    Author:
    Rainer Klute (klute@rainer-klute.de) for the Apache Software Foundation (org.apache.poi.hpsf)
    • Field Detail

      • dwLowDateTime

        public int dwLowDateTime
      • dwHighDateTime

        public int dwHighDateTime
    • Constructor Detail

      • FILETIME

        public FILETIME(Date date)
      • FILETIME

        public FILETIME(WinNT.LARGE_INTEGER ft)
        Construct FILETIME from LARGE_INTEGER
        Parameters:
        ft -
      • FILETIME

        public FILETIME()
      • FILETIME

        public FILETIME(Pointer memory)
    • Method Detail

      • getFieldOrder

        protected List<String> getFieldOrder()
        Description copied from class: Structure
        Return this Structure's field names in their proper order. For example,
        
         protected List getFieldOrder() {
             return Arrays.asList(new String[] { ... });
         }
         
        IMPORTANT When deriving from an existing Structure subclass, ensure that you augment the list provided by the superclass, e.g.
        
         protected List getFieldOrder() {
             List fields = new ArrayList(super.getFieldOrder());
             fields.addAll(Arrays.asList(new String[] { ... }));
             return fields;
         }
         
        Field order must be explicitly indicated, since the field order as returned by Class.getFields() is not guaranteed to be predictable.
        Specified by:
        getFieldOrder in class Structure
        Returns:
        ordered list of field names
      • filetimeToDate

        public static Date filetimeToDate(int high,
                                          int low)

        Converts a Windows FILETIME into a Date. The Windows FILETIME structure holds a date and time associated with a file. The structure identifies a 64-bit integer specifying the number of 100-nanosecond intervals which have passed since January 1, 1601. This 64-bit value is split into the two double words stored in the structure.

        Parameters:
        high - The higher double word of the FILETIME structure.
        low - The lower double word of the FILETIME structure.
        Returns:
        The Windows FILETIME as a Date.
      • dateToFileTime

        public static long dateToFileTime(Date date)

        Converts a Date into a filetime.

        Parameters:
        date - The date to be converted
        Returns:
        The filetime
        See Also:
        filetimeToDate(int, int)
      • toDate

        public Date toDate()

        Converts this filetime into a Date

        Returns:
        The Date represented by this filetime.
      • toTime

        public long toTime()

        Converts this filetime into a number of milliseconds which have passed since January 1, 1970 (UTC).

        Returns:
        This filetime as a number of milliseconds which have passed since January 1, 1970 (UTC)
      • toLong

        @Deprecated
        public long toLong()
        Deprecated. Replaced by toTime()

        Converts this filetime into a number of milliseconds which have passed since January 1, 1970 (UTC).

        Returns:
        This filetime as a number of milliseconds which have passed since January 1, 1970 (UTC)
      • toDWordLong

        public WinDef.DWORDLONG toDWordLong()

        Converts the two 32-bit unsigned integer parts of this filetime into a 64-bit unsigned integer representing the number of 100-nanosecond intervals since January 1, 1601 (UTC).

        Returns:
        This filetime as a 64-bit unsigned integer number of 100-nanosecond intervals since January 1, 1601 (UTC).
      • toString

        public String toString()
        Description copied from class: Structure
        If jna.dump_memory is true, will include a native memory dump of the Structure's backing memory.
        Overrides:
        toString in class Structure
        Returns:
        String representation of this object.
JNA API 4.4.0

Copyright © 2007-2016 Timothy Wall. All Rights Reserved.