Java Doc for PrintWriterImpl.java in  » Development » Monolog » org » objectweb » util » monolog » wrapper » printwriter » 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 » Development » Monolog » org.objectweb.util.monolog.wrapper.printwriter 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.io.PrintWriter
   org.objectweb.util.monolog.wrapper.printwriter.PrintWriterImpl

PrintWriterImpl
public class PrintWriterImpl extends PrintWriter implements Loggable(Code)
This class is a PrintWriter wrapper. It exports the PrintWriter methods but fowards the message to a Logger. This implementation bufferizes the data when a print method is used. The buffer and the data are always written when a println method is used. No end of line are inserted by the println methods. A line is equals to a monolog message.
author:
   Sebastien Chassande-Barrioz


Field Summary
protected  StringcurrentLine
     This field is the buffer which represents the current line.
protected  booleanerrors
     This field indicates the setError method was called.
protected  intlevel
    
protected  Loggerlogger
    
protected  LoggerFactoryloggerFactory
    

Constructor Summary
public  PrintWriterImpl(Logger l)
     It builds a PrintWriterImpl instance.
public  PrintWriterImpl(Logger logger, LoggerFactory loggerFactory)
     It builds a PrintWriterImpl instance.
public  PrintWriterImpl(Logger l, int level)
     It builds a PrintWriterImpl instance.
Parameters:
  l - is the logger toward which the message must be send
Parameters:
  level - is the level used to log message.

Method Summary
public  booleancheckError()
     Flush the stream and check its error state.
public  voidclose()
    
public  voidflush()
    
public  intgetLevel()
    
public  LoggergetLogger()
    
public  LoggerFactorygetLoggerFactory()
    
public  voidprint(boolean x)
     Print a boolean value in the buffer.
public  voidprint(char x)
     Print a character in the buffer.
public  voidprint(char[] x)
     Print an array of characters in the buffer.
public  voidprint(double x)
     Print a double-precision floating-point number in the buffer.
public  voidprint(float x)
     Print a floating-point number in the buffer.
public  voidprint(int x)
     Print an integer in the buffer.
public  voidprint(long x)
     Print a long integer in the buffer.
public  voidprint(Object x)
     Print an object in the buffer.
public  voidprint(String x)
     Print a string in the buffer.
public  voidprintln()
    
public  voidprintln(boolean x)
    
public  voidprintln(char x)
    
public  voidprintln(char[] x)
    
public  voidprintln(double x)
     Send the buffer and a a double-precision floating-point number to the logger.
public  voidprintln(float x)
    
public  voidprintln(int x)
    
public  voidprintln(long x)
    
public  voidprintln(Object x)
    
public  voidprintln(String x)
    
protected  voidsetError()
     Indicate that an error has occurred.
public  voidsetLevel(int level)
    
public  voidsetLogger(Logger logger)
    
public  voidsetLoggerFactory(LoggerFactory lf)
    
public  voidwrite(char[] buf)
     Write an array of characters in the buffer.
public  voidwrite(char[] buf, int off, int len)
     Write a portion of an array of characters in the buffer.
public  voidwrite(int c)
     Write a single character in the buffer.
public  voidwrite(String s)
     Write a string in the buffer.
public  voidwrite(String s, int off, int len)
     Write a portion of a string in the buffer.

Field Detail
currentLine
protected String currentLine(Code)
This field is the buffer which represents the current line.



errors
protected boolean errors(Code)
This field indicates the setError method was called.



level
protected int level(Code)



logger
protected Logger logger(Code)
The inner logger instance



loggerFactory
protected LoggerFactory loggerFactory(Code)




Constructor Detail
PrintWriterImpl
public PrintWriterImpl(Logger l) throws NullPointerException(Code)
It builds a PrintWriterImpl instance. The default level is DEBUG
Parameters:
  l - is the logger toward which the message must be send
throws:
  NullPointerException - if the parameter is null.



PrintWriterImpl
public PrintWriterImpl(Logger logger, LoggerFactory loggerFactory) throws NullPointerException(Code)
It builds a PrintWriterImpl instance. The default level is DEBUG
Parameters:
  logger - is the logger toward which the message must be send
Parameters:
  loggerFactory - is the loggerFactory of the logger
throws:
  NullPointerException - if one of the parameters is null.



PrintWriterImpl
public PrintWriterImpl(Logger l, int level) throws NullPointerException(Code)
It builds a PrintWriterImpl instance.
Parameters:
  l - is the logger toward which the message must be send
Parameters:
  level - is the level used to log message.
throws:
  NullPointerException - if the parameter is null.




Method Detail
checkError
public boolean checkError()(Code)
Flush the stream and check its error state.



close
public void close()(Code)
It writes the buffer if it is not empty



flush
public void flush()(Code)
It writes the buffer if it is not empty



getLevel
public int getLevel()(Code)



getLogger
public Logger getLogger()(Code)
Retrieves the logger instance used



getLoggerFactory
public LoggerFactory getLoggerFactory()(Code)
Retrieves the logger factory instance used



print
public void print(boolean x)(Code)
Print a boolean value in the buffer.



print
public void print(char x)(Code)
Print a character in the buffer.



print
public void print(char[] x)(Code)
Print an array of characters in the buffer.



print
public void print(double x)(Code)
Print a double-precision floating-point number in the buffer.



print
public void print(float x)(Code)
Print a floating-point number in the buffer.



print
public void print(int x)(Code)
Print an integer in the buffer.



print
public void print(long x)(Code)
Print a long integer in the buffer.



print
public void print(Object x)(Code)
Print an object in the buffer.



print
public void print(String x)(Code)
Print a string in the buffer.



println
public void println()(Code)
Send the buffer to the logger



println
public void println(boolean x)(Code)
Send the buffer and a boolean value to the logger



println
public void println(char x)(Code)
Send the buffer and a character to the logger



println
public void println(char[] x)(Code)
Send the buffer and an array of characters to the logger



println
public void println(double x)(Code)
Send the buffer and a a double-precision floating-point number to the logger.



println
public void println(float x)(Code)
Send the buffer and a floating-point number to the logger



println
public void println(int x)(Code)
Send the buffer and an integer to the logger



println
public void println(long x)(Code)
Send the buffer and a long integer number to the logger



println
public void println(Object x)(Code)
Send the buffer and an object to the logger



println
public void println(String x)(Code)
Send the buffer and a String to the logger



setError
protected void setError()(Code)
Indicate that an error has occurred.



setLevel
public void setLevel(int level)(Code)



setLogger
public void setLogger(Logger logger)(Code)
Assigns the logger instance to use



setLoggerFactory
public void setLoggerFactory(LoggerFactory lf)(Code)
Assigns the logger factory instance to use



write
public void write(char[] buf)(Code)
Write an array of characters in the buffer.



write
public void write(char[] buf, int off, int len)(Code)
Write a portion of an array of characters in the buffer.



write
public void write(int c)(Code)
Write a single character in the buffer.



write
public void write(String s)(Code)
Write a string in the buffer.



write
public void write(String s, int off, int len)(Code)
Write a portion of a string in the buffer.



Fields inherited from java.io.PrintWriter
protected Writer out(Code)(Java Doc)

Methods inherited from java.io.PrintWriter
public PrintWriter append(CharSequence csq)(Code)(Java Doc)
public PrintWriter append(CharSequence csq, int start, int end)(Code)(Java Doc)
public PrintWriter append(char c)(Code)(Java Doc)
public boolean checkError()(Code)(Java Doc)
protected void clearError()(Code)(Java Doc)
public void close()(Code)(Java Doc)
public void flush()(Code)(Java Doc)
public PrintWriter format(String format, Object... args)(Code)(Java Doc)
public PrintWriter format(Locale l, String format, Object... args)(Code)(Java Doc)
public void print(boolean b)(Code)(Java Doc)
public void print(char c)(Code)(Java Doc)
public void print(int i)(Code)(Java Doc)
public void print(long l)(Code)(Java Doc)
public void print(float f)(Code)(Java Doc)
public void print(double d)(Code)(Java Doc)
public void print(char s)(Code)(Java Doc)
public void print(String s)(Code)(Java Doc)
public void print(Object obj)(Code)(Java Doc)
public PrintWriter printf(String format, Object... args)(Code)(Java Doc)
public PrintWriter printf(Locale l, String format, Object... args)(Code)(Java Doc)
public void println()(Code)(Java Doc)
public void println(boolean x)(Code)(Java Doc)
public void println(char x)(Code)(Java Doc)
public void println(int x)(Code)(Java Doc)
public void println(long x)(Code)(Java Doc)
public void println(float x)(Code)(Java Doc)
public void println(double x)(Code)(Java Doc)
public void println(char x)(Code)(Java Doc)
public void println(String x)(Code)(Java Doc)
public void println(Object x)(Code)(Java Doc)
protected void setError()(Code)(Java Doc)
public void write(int c)(Code)(Java Doc)
public void write(char buf, int off, int len)(Code)(Java Doc)
public void write(char buf)(Code)(Java Doc)
public void write(String s, int off, int len)(Code)(Java Doc)
public void write(String s)(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.