Class WindowsDate

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<java.util.Date>

    public class WindowsDate
    extends java.util.Date
    implements java.lang.Cloneable
    Windows??FILETIME?`??????????????Date???h?χ?N???X?B
    FILETIME ?? 1601?N 1?? 1?? 0??0??0?b???????o???????? 100?i?m?b?P????????64?r?b?g?l?B
    ?}???N???X???? FILETIME ?? long(64?r?b?g?l)???????????????? ???{?I???????????????????B
    1601?N 1?? 1?? 0??0??0?b???O???????????‘???‘?????? WindowsDate( Date date ) ???AWindowsDate.setTime( long time )???g?p?????B
     -- revision history --
     $Log: WindowsDate.java,v $
     Revision 1.1  2002/12/05 00:00:00  dangan
     [maintenance]
         javadoc ?R?????g???X?y???~?X???C???B
         ?\?[?X????
    
     Revision 1.0  2002/08/05 00:00:00  dangan
     add to version control
     [bug fix] 
         set?n???\?b?h?? ?????O?????????Z?b?g????????????
         ???O?????‹???P?[?X?????????????????????????s???????‘?????????B
         checkRange ???????????????????????‘???B
     [maintenance]
         ?^?u???p?~
         ???C?Z???X?χ???C??
    
     
    Version:
    $Revision: 1.1 $
    Author:
    $Author: dangan $
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static long TIME_DIFFERENCE
      FILETIME?`?????f?[?^???Ajava.util.Date.getTime() ?? ?????????????`?????????????? 100?i?m?Z?J???h?P?????????????l?B ???N?A?[?b?????l?χ?????????‘???‘?B
    • Constructor Summary

      Constructors 
      Constructor Description
      WindowsDate()
      ?f?t?H???g?R???X?g???N?^?B ???????????????????? WindowsDate???\?z?????B ?i?m?b?P?????????????????????‘?????A0?????????????B
      WindowsDate​(long time)
      ????????64?r?b?g??FILETIME?`???????????????? ?V???‘WindowsDate???\?z?????B
      WindowsDate​(java.util.Date date)
      date?????????????????\?? WindowsDate???\?z?????B
      date?? WindowsDate ???C???X?^???X?????? ?i?m?b?P???????????R?s?[?????????A???????O???????? ?i?m?b?P???????????? 0 ?????????????B
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      java.lang.Object clone()
      ?}???I?u?W?F?N?g???R?s?[???????B
      long getWindowsTime()
      ?}?? WindowsDate???????????????? FILETIME ?`?????????B
      void setDate​(int date)
      Deprecated. 
      void setHours​(int hours)
      Deprecated. 
      void setMinutes​(int minutes)
      Deprecated. 
      void setMonth​(int month)
      Deprecated. 
      void setSeconds​(int seconds)
      Deprecated. 
      void setTime​(long time)
      ?}?? WindowsDate ???????????? 1970?N1??1?? 00:00:00 GMT???? time ?~???b?o?????????????????????B
      ?}?????\?b?h???????`?F?b?N???s???????????????χ???????B
      void setWindowsTime​(long time)
      ?}?? WindowsDate ?? FILETIME?`???????????????????????B
      void setYear​(int year)
      Deprecated. 
      • Methods inherited from class java.util.Date

        after, before, compareTo, equals, from, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTime, getTimezoneOffset, getYear, hashCode, parse, toGMTString, toInstant, toLocaleString, toString, UTC
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • TIME_DIFFERENCE

        public static final long TIME_DIFFERENCE
        FILETIME?`?????f?[?^???Ajava.util.Date.getTime() ?? ?????????????`?????????????? 100?i?m?Z?J???h?P?????????????l?B ???N?A?[?b?????l?χ?????????‘???‘?B
        See Also:
        Constant Field Values
    • Constructor Detail

      • WindowsDate

        public WindowsDate()
        ?f?t?H???g?R???X?g???N?^?B ???????????????????? WindowsDate???\?z?????B ?i?m?b?P?????????????????????‘?????A0?????????????B
        Throws:
        java.lang.IllegalArgumentException - ???????????? FILETIME ?`?????\???????? ?????O???????????B
      • WindowsDate

        public WindowsDate​(java.util.Date date)
        date?????????????????\?? WindowsDate???\?z?????B
        date?? WindowsDate ???C???X?^???X?????? ?i?m?b?P???????????R?s?[?????????A???????O???????? ?i?m?b?P???????????? 0 ?????????????B
        Parameters:
        date - ?V?????\?z?????? WindowsDate ???????????????????????? Date ???I?u?W?F?N?g
        Throws:
        java.lang.IllegalArgumentException - ???????????? FILETIME ?`?????\???????? ?????O???????????B
      • WindowsDate

        public WindowsDate​(long time)
        ????????64?r?b?g??FILETIME?`???????????????? ?V???‘WindowsDate???\?z?????B
        Parameters:
        time - FILETIME?`????????????
    • Method Detail

      • clone

        public java.lang.Object clone()
        ?}???I?u?W?F?N?g???R?s?[???????B
        Overrides:
        clone in class java.util.Date
        Returns:
        ?}??WindowsDate?I?u?W?F?N?g??????
      • setYear

        public void setYear​(int year)
        Deprecated.
        ?}?? WindowsDate ???????N?? year ?? ?w?????????l??1900???????????????????????B
        ?}?????\?b?h???????`?F?b?N???s???????????????χ???????B
        Overrides:
        setYear in class java.util.Date
        Parameters:
        year - 1900???????}???????????\???????? ?N???l
        Throws:
        java.lang.IllegalArgumentException - year ?????X???????}?? FILETIME?`???????????‘ ??????????????????????
      • setMonth

        public void setMonth​(int month)
        Deprecated.
        ?}?? WindowsDate ?????????? month ???w?????????l???????????B
        ?}?????\?b?h???????`?F?b?N???s???????????????χ???????B
        Overrides:
        setMonth in class java.util.Date
        Parameters:
        month - 0??1???A1??2???????????????????l
        Throws:
        java.lang.IllegalArgumentException - month ?????X???????}?? FILETIME?`???????????‘ ??????????????????????
      • setDate

        public void setDate​(int date)
        Deprecated.
        ?}?? WindowsDate ?????? ???????? ???????????????? date ???w?????????l???????????B
        ?}?????\?b?h???????`?F?b?N???s???????????????χ???????B
        Overrides:
        setDate in class java.util.Date
        Parameters:
        date - 1??1???A2??2???????????????????l
        Throws:
        java.lang.IllegalArgumentException - date ?????X???????}?? FILETIME?`???????????‘ ??????????????????????
      • setHours

        public void setHours​(int hours)
        Deprecated.
        ?}?? WindowsDate ???????????????????????? hours ???w?????????l???????????B
        ?}?????\?b?h???????`?F?b?N???s???????????????χ???????B
        Overrides:
        setHours in class java.util.Date
        Parameters:
        hours - ???????l
        Throws:
        java.lang.IllegalArgumentException - hours ?????X???????}?? FILETIME?`???????????‘ ??????????????????????
      • setMinutes

        public void setMinutes​(int minutes)
        Deprecated.
        ?}?? WindowsDate ???????????????????????? minutes ???w?????????l???????????B
        ?}?????\?b?h???????`?F?b?N???s???????????????χ???????B
        Overrides:
        setMinutes in class java.util.Date
        Parameters:
        minutes - ?????l
        Throws:
        java.lang.IllegalArgumentException - minutes ?????X???????}?? FILETIME?`???????????‘ ??????????????????????
      • setSeconds

        public void setSeconds​(int seconds)
        Deprecated.
        ?}?? WindowsDate ???????????????????b???? secounds ???w?????????l???????????B
        ?}?????\?b?h???????`?F?b?N???s???????????????χ???????B
        Overrides:
        setSeconds in class java.util.Date
        Parameters:
        secounds - ?b??
        Throws:
        java.lang.IllegalArgumentException - secounds ?????X???????}?? FILETIME?`???????????‘ ??????????????????????
      • setTime

        public void setTime​(long time)
        ?}?? WindowsDate ???????????? 1970?N1??1?? 00:00:00 GMT???? time ?~???b?o?????????????????????B
        ?}?????\?b?h???????`?F?b?N???s???????????????χ???????B
        Overrides:
        setTime in class java.util.Date
        Parameters:
        time - 1970?N1??1?? 00:00:00GMT ???????o???~???b
        Throws:
        java.lang.IllegalArgumentException - time ??FILETIME?`???????????‘ ???????????????????‘??????
      • setWindowsTime

        public void setWindowsTime​(long time)
        ?}?? WindowsDate ?? FILETIME?`???????????????????????B
        Parameters:
        time - FILETIME?`????????????
      • getWindowsTime

        public long getWindowsTime()
        ?}?? WindowsDate???????????????? FILETIME ?`?????????B
        Returns:
        FILETIME?`?????l