Java Doc for Environment.java in  » Parser » JTopas » de » susebox » java » lang » 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 » Parser » JTopas » de.susebox.java.lang 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


de.susebox.java.lang.Environment

All known Subclasses:   de.susebox.java.lang.DefaultEnvironment,
Environment
public interface Environment (Code)

A Environment object is a substitute for the usual environment as defined in the java.lang.System class, most important the stdin and stdout channels java.lang.System.in and java.lang.System.out .

Environments are especially useful in classes that can be used both standalone (having a main method) or in an application where the class is only one of many. Another scenario would be a simple class designed for use from the command line that should suddenly be invoked in GUI framework without redirecting the default channels java.lang.System.in and java.lang.System.out .

To obtain an Environment instance or to store such instances use the class EnvironmentProvider :

 Environment env = EnvironmentProvider.getEnvironment(this);
 


author:
   Heiko Blau




Method Summary
public  PrintStreamerr()
     This method returns the substitution for java.lang.System.err , the standard error channel.
public  voidexit()
     This method exits the instance of its Environment implementation. After calling exit the Environment instance is generally not any longer usable.
public  intgetExitStatus()
     Retrieving the currently set exit code.
public  InputStreamin()
     This method returns the substitution for java.lang.System.in , the standard input channel.
public  PrintStreamout()
     This method returns the substitution for java.lang.System.out , the standard output channel.
public  voidsetExitStatus(int status)
     During different stages of program execution various exit codes can be set using this method.



Method Detail
err
public PrintStream err() throws UnsupportedOperationException(Code)
This method returns the substitution for java.lang.System.err , the standard error channel. Instead of a public member like in the System class, we prefer the method version since it is more flexible. the java.io.PrintStream that serves as standard error output
throws:
  UnsupportedOperationException - if there is no stderr channel available
See Also:   java.lang.System.err



exit
public void exit() throws UnsupportedOperationException(Code)
This method exits the instance of its Environment implementation. After calling exit the Environment instance is generally not any longer usable. In particular, an implementation can choose to call java.lang.System.exit .
throws:
  UnsupportedOperationException - if the method is not available
See Also:   Environment.setExitStatus
See Also:   java.lang.System.exit



getExitStatus
public int getExitStatus()(Code)
Retrieving the currently set exit code. the currently set exit code of an application



in
public InputStream in() throws UnsupportedOperationException(Code)
This method returns the substitution for java.lang.System.in , the standard input channel. Instead of a public member like in the System class, we prefer the method version since it is more flexible. the java.io.InputStream that serves as standard input
throws:
  UnsupportedOperationException - if there is no stdin channel available
See Also:   java.lang.System.in



out
public PrintStream out() throws UnsupportedOperationException(Code)
This method returns the substitution for java.lang.System.out , the standard output channel. Instead of a public member like in the System class, we prefer the method version since it is more flexible. the java.io.PrintStream that serves as standard output
throws:
  UnsupportedOperationException - if there is no stdout channel available
See Also:   java.lang.System.out



setExitStatus
public void setExitStatus(int status)(Code)
During different stages of program execution various exit codes can be set using this method. For instance, a program may set the exit code to a positive number indicating that it is still running. A negative exit code may stand for errors while 0 is the usual OK code.
Parameters:
  status - the exit code of an application
See Also:   java.lang.System.exit
See Also:   Environment.getExitStatus
See Also:   Environment.exit



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