Java Doc for PrettyJspWriter.java in  » IDE-Netbeans » visualweb.api.designer » org » netbeans » modules » visualweb » jsfsupport » container » 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 » IDE Netbeans » visualweb.api.designer » org.netbeans.modules.visualweb.jsfsupport.container 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.netbeans.modules.visualweb.jsfsupport.container.PrettyJspWriter

PrettyJspWriter
public class PrettyJspWriter extends ResponseWriter (Code)
PrettyJspWriter provides a pretty-formated JSP writer needed for JSP generation
author:
   Robert Brewin, Carl Quinn
version:
   1.0


Field Summary
 Stringencoding
    

Constructor Summary
public  PrettyJspWriter()
    
public  PrettyJspWriter(ResettableStringWriter outputWriter)
    

Method Summary
public  ResponseWritercloneWithWriter(Writer writer)
     Creates a new instance of this ResponseWriter, using a different Writer.
public  voidclose()
     Close the stream, flushing it first.
public  voidendDocument()
    

Write whatever text should end a response.

public  voidendElement(String name)
    

Write the end of an element, after closing any open element created by a call to startElement().

public  voidflush()
     Flush the stream.
public  StringgetCharacterEncoding()
     the character encoding, such as "ISO-8859-1" for thisResponseWriter.
public  StringgetContentType()
    
public  intgetCurrentIndent()
    
public  intgetPosition()
    
public  voidindent()
    
public  voidoutdent()
    
public  voidreset(int position)
     Truncates the written content back to a particular position/index specified.
public  voidsetIndentAmount(int indentAmount)
    
public  voidsetOutputWriter(ResettableStringWriter outputWriter)
    
public  voidstartDocument()
    
public  voidstartElement(String name, UIComponent componentForElement)
    

Write the start of an element, up to and including the element name.

public  voidwrite(char cbuf)
    
public  voidwrite(char[] cbuf, int off, int len)
    
public  voidwrite(int c)
    
public  voidwrite(String str)
    
public  voidwrite(String str, int off, int len)
    
public  voidwriteAttribute(String name, Object value, String componentPropertyName)
    

Write an attribute name and corresponding value (after converting that text to a String if necessary), after escaping it properly. This method may only be called after a call to startElement(), and before the opened element has been closed.


Parameters:
  name - Attribute name to be added
Parameters:
  value - Attribute value to be added
Parameters:
  componentPropertyName - May be null.
public  voidwriteComment(Object comment)
    

Write a comment containing the specified text, after converting that text to a String if necessary.

public  voidwriteText(Object text, String componentPropertyName)
    

Write an object (after converting it to a String, if necessary), after escaping it properly.

public  voidwriteText(char text)
    

Write a single character, after escaping it properly.

public  voidwriteText(char[] text, int off, int len)
    

Write text from a character array, after escaping it properly for this method.

public  voidwriteURIAttribute(String name, Object value, String componentPropertyName)
    

Write a URI attribute name and corresponding value (after converting that text to a String if necessary), after encoding it properly (for example, '%' encoded for HTML). This method may only be called after a call to startElement(), and before the opened element has been closed.


Parameters:
  name - Attribute name to be added
Parameters:
  value - Attribute value to be added
Parameters:
  componentPropertyName - May be null.

Field Detail
encoding
String encoding(Code)




Constructor Detail
PrettyJspWriter
public PrettyJspWriter()(Code)
Construct the PrettyJspWriter



PrettyJspWriter
public PrettyJspWriter(ResettableStringWriter outputWriter)(Code)
Construct the PrettyJspWriter




Method Detail
cloneWithWriter
public ResponseWriter cloneWithWriter(Writer writer)(Code)
Creates a new instance of this ResponseWriter, using a different Writer.



close
public void close() throws IOException(Code)
Close the stream, flushing it first. Once a stream has been closed, further write() or flush() invocations will cause an IOException to be thrown. Closing a previously-closed stream, however, has no effect.
exception:
  java.io.IOException - If an I/O error occurs



endDocument
public void endDocument() throws IOException(Code)

Write whatever text should end a response. If there is an open element that has been created by a call to startElement(), that element will be closed first.


exception:
  java.io.IOException - if an input/output error occurs



endElement
public void endElement(String name) throws IOException(Code)

Write the end of an element, after closing any open element created by a call to startElement().
Parameters:
  name - Name of the element to be ended
exception:
  java.io.IOException - if an input/output error occurs
exception:
  java.lang.NullPointerException - if nameis null




flush
public void flush() throws IOException(Code)
Flush the stream. If the stream has saved any characters from the various write() methods in a buffer, write them immediately to their intended destination. Then, if that destination is another character or byte stream, flush it. Thus one flush() invocation will flush all the buffers in a chain of Writers and OutputStreams.
exception:
  java.io.IOException - If an I/O error occurs



getCharacterEncoding
public String getCharacterEncoding()(Code)
the character encoding, such as "ISO-8859-1" for thisResponseWriter. Please see theIANA for a list of character encodings.



getContentType
public String getContentType()(Code)
the content type, such as "text/html" for thisResponseWriter.



getCurrentIndent
public int getCurrentIndent()(Code)
Get the current indentation amount the indent amount



getPosition
public int getPosition()(Code)



indent
public void indent()(Code)
Increment the current indent



outdent
public void outdent()(Code)
Decrement the current indent



reset
public void reset(int position)(Code)
Truncates the written content back to a particular position/index specified. Note: Should only be used to reset back to a position outside of a tag, since it will clear the "closeStart" flag.
Parameters:
  position - The position to jump back to.



setIndentAmount
public void setIndentAmount(int indentAmount)(Code)
Set the amount to indent
Parameters:
  indentAmount -



setOutputWriter
public void setOutputWriter(ResettableStringWriter outputWriter)(Code)
Set the output writer
Parameters:
  outputWriter - -- the new Writer to use for emission



startDocument
public void startDocument() throws IOException(Code)

Write whatever text should begin a response.


exception:
  java.io.IOException - if an input/output error occurs



startElement
public void startElement(String name, UIComponent componentForElement) throws IOException(Code)

Write the start of an element, up to and including the element name. Once this method has been called, clients can call writeAttribute() or writeURIAttribute() method to add attributes and corresponding values. The starting element will be closed (that is, the trailing '>' character added) on any subsequent call to startElement(), writeComment(), writeText(), endElement(), or endDocument().


Parameters:
  name - Name of the element to be started
Parameters:
  componentForElement - May be null. Ifnon-null, must be the UIComponent instance to whichthis element corresponds.
exception:
  IOException - if an input/output error occurs
exception:
  NullPointerException - if nameis null



write
public void write(char cbuf) throws IOException(Code)



write
public void write(char[] cbuf, int off, int len) throws IOException(Code)



write
public void write(int c) throws IOException(Code)



write
public void write(String str) throws IOException(Code)



write
public void write(String str, int off, int len) throws IOException(Code)



writeAttribute
public void writeAttribute(String name, Object value, String componentPropertyName) throws IOException(Code)

Write an attribute name and corresponding value (after converting that text to a String if necessary), after escaping it properly. This method may only be called after a call to startElement(), and before the opened element has been closed.


Parameters:
  name - Attribute name to be added
Parameters:
  value - Attribute value to be added
Parameters:
  componentPropertyName - May be null. Ifnon-null, this must be the name of the property onthe UIComponent passed in to a previous call to PrettyJspWriter.startElement to which this attribute corresponds.
exception:
  IllegalStateException - if this method is called when thereis no currently open element
exception:
  IOException - if an input/output error occurs
exception:
  NullPointerException - if name isnull



writeComment
public void writeComment(Object comment) throws IOException(Code)

Write a comment containing the specified text, after converting that text to a String if necessary. If there is an open element that has been created by a call to startElement(), that element will be closed first.


Parameters:
  comment - Text content of the comment
exception:
  java.io.IOException - if an input/output error occurs
exception:
  java.lang.NullPointerException - if commentis null



writeText
public void writeText(Object text, String componentPropertyName) throws IOException(Code)

Write an object (after converting it to a String, if necessary), after escaping it properly. If there is an open element that has been created by a call to startElement(), that element will be closed first.

All angle bracket occurrences in the argument must be escaped using the > < syntax.


Parameters:
  text - Text to be written
Parameters:
  componentPropertyName - May be null. Ifnon-null, this is the name of the property in theassociated component to which this piece of text applies.
exception:
  IOException - if an input/output error occurs
exception:
  NullPointerException - if textis null



writeText
public void writeText(char text) throws IOException(Code)

Write a single character, after escaping it properly. If there is an open element that has been created by a call to startElement(), that element will be closed first.


Parameters:
  text - Text to be written
exception:
  java.io.IOException - if an input/output error occurs



writeText
public void writeText(char[] text, int off, int len) throws IOException(Code)

Write text from a character array, after escaping it properly for this method. If there is an open element that has been created by a call to startElement(), that element will be closed first.


Parameters:
  text - Text to be written
Parameters:
  off - Starting offset (zero-relative)
Parameters:
  len - Number of characters to be written
exception:
  java.lang.IndexOutOfBoundsException - if the calculated starting orending position is outside the bounds of the character array
exception:
  java.io.IOException - if an input/output error occurs
exception:
  java.lang.NullPointerException - if textis null



writeURIAttribute
public void writeURIAttribute(String name, Object value, String componentPropertyName) throws IOException(Code)

Write a URI attribute name and corresponding value (after converting that text to a String if necessary), after encoding it properly (for example, '%' encoded for HTML). This method may only be called after a call to startElement(), and before the opened element has been closed.


Parameters:
  name - Attribute name to be added
Parameters:
  value - Attribute value to be added
Parameters:
  componentPropertyName - May be null. Ifnon-null, this must be the name of the property onthe UIComponent passed in to a previous call to PrettyJspWriter.startElement to which this attribute corresponds.
exception:
  IllegalStateException - if this method is called when thereis no currently open element
exception:
  IOException - if an input/output error occurs
exception:
  NullPointerException - if name isnull



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