Class Filetime

java.lang.Object
org.apache.poi.hpsf.Filetime

@Internal public class Filetime extends Object
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, Coordinated Universal Time (UTC).
  • Constructor Details

    • Filetime

      public Filetime()
    • Filetime

      public Filetime(Date date)
  • Method Details

    • read

      public void read(LittleEndianByteArrayInputStream lei)
    • toByteArray

      public byte[] toByteArray()
    • write

      public int write(OutputStream out) throws IOException
      Throws:
      IOException
    • getJavaValue

      public Date getJavaValue()
    • filetimeToDate

      public static Date filetimeToDate(long filetime)
      Converts a Windows FILETIME (in UTC) into a Date (in UTC).
      Parameters:
      filetime - The filetime to convert.
      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:
    • isUndefined

      public static boolean isUndefined(Date date)
      Return true if the date is undefined
      Parameters:
      date - the date
      Returns:
      true if the date is undefined