Package org.apache.poi.hpsf
Class Filetime
- java.lang.Object
-
- org.apache.poi.hpsf.Filetime
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static longdateToFileTime(Date date)Converts aDateinto a filetime.static DatefiletimeToDate(long filetime)Converts a Windows FILETIME (in UTC) into aDate(in UTC).DategetJavaValue()static booleanisUndefined(Date date)Returntrueif the date is undefinedvoidread(LittleEndianByteArrayInputStream lei)byte[]toByteArray()intwrite(OutputStream out)
-
-
-
Constructor Detail
-
Filetime
public Filetime()
-
Filetime
public Filetime(Date date)
-
-
Method Detail
-
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 aDate(in UTC).- Parameters:
filetime- The filetime to convert.- Returns:
- The Windows FILETIME as a
Date.
-
dateToFileTime
public static long dateToFileTime(Date date)
Converts aDateinto a filetime.- Parameters:
date- The date to be converted- Returns:
- The filetime
- See Also:
filetimeToDate(long)
-
isUndefined
public static boolean isUndefined(Date date)
Returntrueif the date is undefined- Parameters:
date- the date- Returns:
trueif the date is undefined
-
-