Java Doc for ZoneInfo.java in  » 6.0-JDK-Modules » j2me » sun » util » calendar » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » j2me » sun.util.calendar 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.util.TimeZone
      sun.util.calendar.ZoneInfo

ZoneInfo
public class ZoneInfo extends TimeZone (Code)
ZoneInfo is an implementation subclass of java.util.TimeZone TimeZone that represents GMT offsets and daylight saving time transitions of a time zone.

The daylight saving time transitions are described in the ZoneInfo.transitions transitions table consisting of a chronological sequence of transitions of GMT offset and/or daylight saving time changes. Since all transitions are represented in UTC, in theory, ZoneInfo can be used with any calendar systems except for the ZoneInfo.getOffset(int,int,int,int,int,int) getOffset method that takes Gregorian calendar date fields.

This table covers transitions from 1900 until 2037 (as of version 1.4), Before 1900, it assumes that there was no daylight saving time and the getOffset methods always return the ZoneInfo.getRawOffset value. No Local Mean Time is supported. If a specified date is beyond the transition table and this time zone is supposed to observe daylight saving time in 2037, it delegates operations to a java.util.SimpleTimeZone SimpleTimeZone object created using the daylight saving time schedule as of 2037.

The date items, transitions, GMT offset(s), etc. are read from a database file. See ZoneInfoFile for details.
See Also:   java.util.SimpleTimeZone
since:
   1.4




Constructor Summary
public  ZoneInfo()
     A constructor.
public  ZoneInfo(String ID, int rawOffset)
     A Constructor for CustomID.
 ZoneInfo(String ID, int rawOffset, int dstSavings, int checksum, long[] transitions, int[] offsets, int[] simpleTimeZoneParams, boolean willGMTOffsetChange)
     Constructs a ZoneInfo instance.

Method Summary
public  booleanequals(Object obj)
     Compares the equity of two ZoneInfo objects.
public static  String[]getAvailableIDs()
     Gets all available IDs supported in the Java run-time.
public static  String[]getAvailableIDs(int rawOffset)
     Gets all available IDs that have the same value as the specified raw GMT offset.
Parameters:
  rawOffset - the GMT offset in milliseconds.
public  intgetDSTSavings()
     Returns the amount of time in milliseconds that the clock is advanced during daylight saving time is in effect in its last daylight saving time rule.
public  SimpleTimeZonegetLastRuleInstance()
     Returns a SimpleTimeZone object that represents the last known daylight saving time rules.
public  intgetOffset(long date)
     Returns the difference in milliseconds between local time and UTC of given time, taking into account both the raw offset and the effect of daylight savings.
public  intgetOffset(int era, int year, int month, int day, int dayOfWeek, int milliseconds)
     Returns the difference in milliseconds between local time and UTC, taking into account both the raw offset and the effect of daylight savings, for the specified date and time.
public  intgetOffsets(long utc, int[] offsets)
    
public  intgetOffsetsByWall(long wall, int[] offsets)
    
public  intgetRawOffset()
     Returns the GMT offset of the current date.
public static  TimeZonegetTimeZone(String ID)
     Gets the ZoneInfo for the given ID.
Parameters:
  ID - the ID for a ZoneInfo.
public  booleanhasSameRules(TimeZone other)
     Returns true if this zone has the same raw GMT offset value and transition table as another zone info.
public  inthashCode()
     Returns a hash code value calculated from the GMT offset and transitions.
public  booleaninDaylightTime(Date date)
     Queries if the specified date is in Daylight Saving Time.
public synchronized  voidsetRawOffset(int offsetMillis)
     Sets the base time zone offset from GMT.
public  StringtoString()
     Returns a string representation of this time zone.
public  booleanuseDaylightTime()
     Queries if this time zone uses Daylight Saving Time in the last known rule.


Constructor Detail
ZoneInfo
public ZoneInfo()(Code)
A constructor.



ZoneInfo
public ZoneInfo(String ID, int rawOffset)(Code)
A Constructor for CustomID.



ZoneInfo
ZoneInfo(String ID, int rawOffset, int dstSavings, int checksum, long[] transitions, int[] offsets, int[] simpleTimeZoneParams, boolean willGMTOffsetChange)(Code)
Constructs a ZoneInfo instance.
Parameters:
  ID - time zone name
Parameters:
  rawOffset - GMT offset in milliseconds
Parameters:
  dstSavings - daylight saving value in milliseconds or 0(zero) if this time zone doesn't observe Daylight Saving Time.
Parameters:
  checksum - CRC32 value with all transitions table entryvalues
Parameters:
  transitions - transition table
Parameters:
  offsets - offset value table
Parameters:
  simpleTimeZoneParams - parameter values for constructingSimpleTimeZone
Parameters:
  willGMTOffsetChange - the value of willGMTOffsetChange




Method Detail
equals
public boolean equals(Object obj)(Code)
Compares the equity of two ZoneInfo objects.
Parameters:
  obj - the object to be compared with true if given object is same as this ZoneInfo object,false otherwise.



getAvailableIDs
public static String[] getAvailableIDs()(Code)
Gets all available IDs supported in the Java run-time. an array of time zone IDs.



getAvailableIDs
public static String[] getAvailableIDs(int rawOffset)(Code)
Gets all available IDs that have the same value as the specified raw GMT offset.
Parameters:
  rawOffset - the GMT offset in milliseconds. Thisvalue should not include any daylight saving time. an array of time zone IDs.



getDSTSavings
public int getDSTSavings()(Code)
Returns the amount of time in milliseconds that the clock is advanced during daylight saving time is in effect in its last daylight saving time rule. the number of milliseconds the time is advanced with respect tostandard time when daylight saving time is in effect.



getLastRuleInstance
public SimpleTimeZone getLastRuleInstance()(Code)
Returns a SimpleTimeZone object that represents the last known daylight saving time rules. a SimpleTimeZone object or null if this time zonedoesn't observe DST.



getOffset
public int getOffset(long date)(Code)
Returns the difference in milliseconds between local time and UTC of given time, taking into account both the raw offset and the effect of daylight savings.
Parameters:
  date - the milliseconds in UTC the milliseconds to add to UTC to get local wall time



getOffset
public int getOffset(int era, int year, int month, int day, int dayOfWeek, int milliseconds)(Code)
Returns the difference in milliseconds between local time and UTC, taking into account both the raw offset and the effect of daylight savings, for the specified date and time. This method assumes that the start and end month are distinct. This method assumes a Gregorian calendar for calculations.

Note: In general, clients should use Calendar.ZONE_OFFSET Calendar.get(ZONE_OFFSET) + Calendar.DST_OFFSET Calendar.get(DST_OFFSET) instead of calling this method.
Parameters:
  era - The era of the given date. The value must be eitherGregorianCalendar.AD or GregorianCalendar.BC.
Parameters:
  year - The year in the given date.
Parameters:
  month - The month in the given date. Month is 0-based. e.g.,0 for January.
Parameters:
  day - The day-in-month of the given date.
Parameters:
  dayOfWeek - The day-of-week of the given date.
Parameters:
  millis - The milliseconds in day in standard local time. The milliseconds to add to UTC to get local time.




getOffsets
public int getOffsets(long utc, int[] offsets)(Code)



getOffsetsByWall
public int getOffsetsByWall(long wall, int[] offsets)(Code)



getRawOffset
public int getRawOffset()(Code)
Returns the GMT offset of the current date. This GMT offset value is not modified during Daylight Saving Time. the GMT offset value in milliseconds to add to UTC timeto get local standard time



getTimeZone
public static TimeZone getTimeZone(String ID)(Code)
Gets the ZoneInfo for the given ID.
Parameters:
  ID - the ID for a ZoneInfo. See TimeZone for detail. the specified ZoneInfo object or null if there is notime zone of the ID.



hasSameRules
public boolean hasSameRules(TimeZone other)(Code)
Returns true if this zone has the same raw GMT offset value and transition table as another zone info. If the specified TimeZone object is not a ZoneInfo instance, this method returns true if the specified TimeZone object has the same raw GMT offset value with no daylight saving time.
Parameters:
  other - the ZoneInfo object to be compared with true if the given TimeZone has the sameGMT offset and transition information, false, otherwise.



hashCode
public int hashCode()(Code)
Returns a hash code value calculated from the GMT offset and transitions. a hash code of this time zone



inDaylightTime
public boolean inDaylightTime(Date date)(Code)
Queries if the specified date is in Daylight Saving Time.



setRawOffset
public synchronized void setRawOffset(int offsetMillis)(Code)
Sets the base time zone offset from GMT. This operation modifies all the transitions of this ZoneInfo object, including historical ones, if applicable.
Parameters:
  offsetMillis - the base time zone offset to GMT.
See Also:   getRawOffset



toString
public String toString()(Code)
Returns a string representation of this time zone. the string



useDaylightTime
public boolean useDaylightTime()(Code)
Queries if this time zone uses Daylight Saving Time in the last known rule.



Methods inherited from java.util.TimeZone
public static String[] getAvailableIDs()(Code)(Java Doc)
public static synchronized TimeZone getDefault()(Code)(Java Doc)
public String getID()(Code)(Java Doc)
abstract public int getOffset(int era, int year, int month, int day, int dayOfWeek, int millis)(Code)(Java Doc)
abstract public int getRawOffset()(Code)(Java Doc)
public static synchronized TimeZone getTimeZone(String ID)(Code)(Java Doc)
abstract public boolean useDaylightTime()(Code)(Java Doc)

Methods inherited from java.lang.Object
public boolean equals(Object obj)(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.