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 long
dateToFileTime(Date date)
Converts aDate
into a filetime.static Date
filetimeToDate(long filetime)
Converts a Windows FILETIME (in UTC) into aDate
(in UTC).Date
getJavaValue()
static boolean
isUndefined(Date date)
Returntrue
if the date is undefinedvoid
read(LittleEndianByteArrayInputStream lei)
byte[]
toByteArray()
int
write(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 aDate
into a filetime.- Parameters:
date
- The date to be converted- Returns:
- The filetime
- See Also:
filetimeToDate(long)
-
isUndefined
public static boolean isUndefined(Date date)
Returntrue
if the date is undefined- Parameters:
date
- the date- Returns:
true
if the date is undefined
-
-