com.sun.jna.platform.win32

## Class WinBase.FILETIME

- java.lang.Object
- - com.sun.jna.Structure
  - - com.sun.jna.platform.win32.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)

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `WinBase.FILETIME.ByReference`

    - ### Nested classes/interfaces inherited from class com.sun.jna.Structure

      `Structure.ByValue, Structure.StructField`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int` | `dwHighDateTime`
    `int` | `dwLowDateTime`

    - ### Fields inherited from class com.sun.jna.Structure

      `ALIGN_DEFAULT, ALIGN_GNUC, ALIGN_MSVC, ALIGN_NONE, CALCULATE_SIZE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `WinBase.FILETIME()`
    `WinBase.FILETIME(java.util.Date date)`
    `WinBase.FILETIME(Pointer memory)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static long` | `dateToFileTime(java.util.Date date)` Converts a `Date` into a filetime.
    `static java.util.Date` | `filetimeToDate(int high, int low)` Converts a Windows FILETIME into a `Date`.
    `protected java.util.List` | `getFieldOrder()` Return this Structure's field names in their proper order.
    `java.util.Date` | `toDate()`
    `long` | `toLong()`
    `java.lang.String` | `toString()`

    - ### Methods inherited from class com.sun.jna.Structure

      `allocateMemory, allocateMemory, autoAllocate, autoRead, autoRead, autoWrite, autoWrite, cacheTypeInfo, clear, ensureAllocated, equals, fieldOffset, getAutoRead, getAutoWrite, getFieldList, getFields, getNativeAlignment, getNativeSize, getNativeSize, getPointer, getStringEncoding, getStructAlignment, hashCode, newInstance, newInstance, read, readField, readField, setAlignType, setAutoRead, setAutoSynch, setAutoWrite, setFieldOrder, setStringEncoding, size, sortFields, toArray, toArray, toString, useMemory, useMemory, write, writeField, writeField, writeField`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### dwLowDateTime

          public int dwLowDateTime

    - #### dwHighDateTime

          public int dwHighDateTime

  - ### Constructor Detail

    - #### WinBase.FILETIME

          public WinBase.FILETIME(java.util.Date date)

    - #### WinBase.FILETIME

          public WinBase.FILETIME()

    - #### WinBase.FILETIME

          public WinBase.FILETIME(Pointer memory)

  - ### Method Detail

    - #### getFieldOrder

          protected java.util.List 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`

    - #### filetimeToDate

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

    - #### toLong

          public long toLong()

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `Structure`

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