Source Code Cross Referenced for OSInfo.java in  » Mail-Clients » columba-1.4 » org » columba » core » base » 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 » Mail Clients » columba 1.4 » org.columba.core.base 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        //The contents of this file are subject to the Mozilla Public License Version 1.1
002:        //(the "License"); you may not use this file except in compliance with the 
003:        //License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
004:        //
005:        //Software distributed under the License is distributed on an "AS IS" basis,
006:        //WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 
007:        //for the specific language governing rights and
008:        //limitations under the License.
009:        //
010:        //The Original Code is "The Columba Project"
011:        //
012:        //The Initial Developers of the Original Code are Frederik Dietz and Timo Stich.
013:        //Portions created by Frederik Dietz and Timo Stich are Copyright (C) 2003. 
014:        //
015:        //All Rights Reserved.
016:
017:        package org.columba.core.base;
018:
019:        /**
020:         * This is a helper class providing a quick and easy way to obtain useful
021:         * information about the operating system Columba is running on.
022:         * 
023:         * @author Hrk (Luca Santarelli) <hrk@users.sourceforge.net>
024:         */
025:        public class OSInfo {
026:            private static final String OS_NAME = "os.name"; //$NON-NLS-1$
027:
028:            private static final String OS_ARCH = "os.arch"; //$NON-NLS-1$
029:
030:            // Platform identifiers: Windows, Linux, Mac OS, ...
031:
032:            /**
033:             * Returns whether the underlying operating system is a Windows or Windows
034:             * NT platform.
035:             * 
036:             * @return isWindows32Platform
037:             * 
038:             * @see #org.columba.core.base.OSInfo.isWindowsPlatform()
039:             * @see #org.columba.core.base.OSInfo.isWinNTPlatform()
040:             */
041:            public static boolean isWin32Platform() {
042:                return (isWindowsPlatform() || isWinNTPlatform());
043:            }
044:
045:            /**
046:             * Returns whether the underlying operating system is a Windows NT platform.
047:             * 
048:             * @return isWinNTPlatform
049:             * 
050:             * @see #org.columba.core.base.OSInfo.isWinNT()
051:             * @see #org.columba.core.base.OSInfo.isWin2K()
052:             * @see #org.columba.core.base.OSInfo.isWin2K3()
053:             * @see #org.columba.core.base.OSInfo.isWinXP()
054:             */
055:            public static boolean isWinNTPlatform() {
056:                return (isWinNT() || isWin2K() || isWin2K3() || isWinXP());
057:            }
058:
059:            /**
060:             * Returns whether the underlying operating system is a Windows platform.
061:             * 
062:             * @return isWindowsPlatform
063:             * 
064:             * @see #org.columba.core.base.OSInfo.isWin95()
065:             * @see #org.columba.core.base.OSInfo.isWin98()
066:             * @see #org.columba.core.base.OSInfo.isWinME()
067:             */
068:            public static boolean isWindowsPlatform() {
069:                return (isWin95() || isWin98() || isWinME());
070:            }
071:
072:            // Single OS identifiers: Window 95, Window 98, ...
073:
074:            /**
075:             * Returns whether the underlying operating system is Windows 95.
076:             * 
077:             * @return isWin95
078:             */
079:            public static boolean isWin95() {
080:                return "Windows 95".equalsIgnoreCase(System.getProperty(OS_NAME)); //$NON-NLS-1$
081:            }
082:
083:            /**
084:             * Returns whether the underlying operating system is Windows 98.
085:             * 
086:             * @return isWin98
087:             */
088:            public static boolean isWin98() {
089:                return "Windows 98".equalsIgnoreCase(System.getProperty(OS_NAME)); //$NON-NLS-1$
090:            }
091:
092:            /**
093:             * Returns whether the underlying operating system is Windows ME.
094:             * 
095:             * @return isWinME
096:             */
097:            public static boolean isWinME() {
098:                return "Windows ME".equalsIgnoreCase(System.getProperty(OS_NAME)); //$NON-NLS-1$
099:            }
100:
101:            /**
102:             * Returns whether the underlying operating system is Windows NT.
103:             * 
104:             * @return isWinNT
105:             */
106:            public static boolean isWinNT() {
107:                return "Windows NT".equalsIgnoreCase(System.getProperty(OS_NAME)); //$NON-NLS-1$
108:            }
109:
110:            /**
111:             * Returns whether the underlying operating system is Windows 2000.
112:             * 
113:             * @return isWin2K
114:             */
115:            public static boolean isWin2K() {
116:                return "Windows 2000".equalsIgnoreCase(System.getProperty(OS_NAME)); //$NON-NLS-1$
117:            }
118:
119:            /**
120:             * Returns whether the underlying operating system is Windows 2003.
121:             * 
122:             * @return isWin2K3
123:             */
124:            public static boolean isWin2K3() {
125:                return "Windows 2003".equalsIgnoreCase(System.getProperty(OS_NAME)); //$NON-NLS-1$
126:            }
127:
128:            /**
129:             * Returns whether the underlying operating system is Windows XP.
130:             * 
131:             * @return isWinXP
132:             */
133:            public static boolean isWinXP() {
134:                return "Windows XP".equalsIgnoreCase(System.getProperty(OS_NAME)); //$NON-NLS-1$
135:            }
136:
137:            /**
138:             * Returns whether the underlying operating system is Linux.
139:             * 
140:             * @return isLinux
141:             */
142:            public static boolean isLinux() {
143:                return "Linux".equalsIgnoreCase(System.getProperty(OS_NAME)); //$NON-NLS-1$
144:            }
145:
146:            /**
147:             * Returns whether the underlying operating system is Solaris.
148:             * 
149:             * @return isSolaris
150:             */
151:            public static boolean isSolaris() {
152:                return "Solaris".equalsIgnoreCase(System.getProperty(OS_NAME)); //$NON-NLS-1$
153:            }
154:
155:            /**
156:             * Returns whether the underlying operating system is some MacOS.
157:             * 
158:             * @return isMac
159:             */
160:            public static boolean isMac() {
161:                return System.getProperty(OS_NAME).toLowerCase().indexOf("mac") != -1; //$NON-NLS-1$
162:            }
163:
164:            public static boolean isAMD64Bit() {
165:                return System.getProperty(OS_ARCH).toLowerCase().indexOf(
166:                        "amd64") != -1; //$NON-NLS-1$
167:            }
168:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.