Java Doc for XmlWriter.java in  » 6.0-JDK-Modules-com.sun » tools » com » sun » tools » internal » ws » util » xml » 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 com.sun » tools » com.sun.tools.internal.ws.util.xml 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.tools.internal.ws.util.xml.XmlWriter

XmlWriter
public class XmlWriter (Code)
A writer of XML output streams.

An XML writer knows hardly anything about XML document well-formedness, to say nothing of validity. It relies upon the invoker to ensure that the generated document is well-formed and, if required, valid.
author:
   WS Development Team




Constructor Summary
public  XmlWriter(OutputStream out, String enc, boolean declare)
     Creates a new writer that will write to the given byte-output stream using the given encoding.
public  XmlWriter(OutputStream out, String enc)
     Creates a new writer that will write to the given byte-output stream using the given encoding.
public  XmlWriter(OutputStream out)
     Creates a new writer that will write to the given byte-output stream using the UTF-8 encoding.

Method Summary
public  voidattribute(String name, String value)
     Writes an attribute for the current element.
public  voidattribute(String prefix, String name, String value)
     Writes an attribute for the current element.
public  voidattributeName(String name)
     Writes an attribute name for the current element.
public  voidattributeName(String prefix, String name)
     Writes an attribute name for the current element.
public  voidattributeUnquoted(String name, String value)
     Writes an attribute (unquoted) for the current element.
public  voidattributeUnquoted(String prefix, String name, String value)
     Writes an attribute (unquoted) for the current element.
public  voidattributeValue(String value)
     Writes a value for the current attribute.
public  voidattributeValueToken(String token)
     Writes one token of the current attribute's value.
public  voidattributeValueUnquoted(String value)
     Writes a value (unquoted) for the current attribute.
public  voidchars(String chars)
     Writes some character data.
public  voidchars(CDATA chars)
    
public  voidcharsUnquoted(String chars)
     Writes some character data, skipping quoting.
public  voidcharsUnquoted(char[] buf, int off, int len)
     Writes some character data, skipping quoting.
public  voidclose()
     Flushes the writer and closes the underlying byte-output stream.
public  voiddoctype(String root, String dtd)
     Writes a DOCTYPE declaration.
public  voidend(String name)
     Writes an end tag for the named element.
public  voidflush()
     Flushes the writer.
public  voidinlineLeaf(String name, String chars)
    
public  voidinlineLeaf(String name)
    
public  voidleaf(String name, String chars)
     Writes a leaf element with the given character content.
public  voidleaf(String name)
     Writes an empty leaf element.
public  voidsetQuote(char quote)
     Sets the quote character to be used by this writer when writing attribute values.
public  voidstart(String name)
     Writes a start tag for the named element.


Constructor Detail
XmlWriter
public XmlWriter(OutputStream out, String enc, boolean declare) throws UnsupportedEncodingException, IOException(Code)
Creates a new writer that will write to the given byte-output stream using the given encoding. An initial XML declaration will optionally be written to the stream.


Parameters:
  out - The target byte-output stream
Parameters:
  enc - The character encoding to be used
Parameters:
  declare - If true, write the XML declaration to the output stream
throws:
  IOException - If an I/O error occurs
throws:
  UnsupportedEncodingException - If the named encoding is not supported



XmlWriter
public XmlWriter(OutputStream out, String enc) throws UnsupportedEncodingException, IOException(Code)
Creates a new writer that will write to the given byte-output stream using the given encoding. An initial XML declaration will be written to the stream.


Parameters:
  out - The target byte-output stream
Parameters:
  enc - The character encoding to be used
throws:
  IOException - If an I/O error occurs
throws:
  UnsupportedEncodingException - If the named encoding is not supported



XmlWriter
public XmlWriter(OutputStream out) throws IOException(Code)
Creates a new writer that will write to the given byte-output stream using the UTF-8 encoding. An initial XML declaration will be written to the stream.


Parameters:
  out - The target byte-output stream
throws:
  IOException - If an I/O error occurs




Method Detail
attribute
public void attribute(String name, String value) throws IOException(Code)
Writes an attribute for the current element.


Parameters:
  name - The attribute's name
Parameters:
  value - The attribute's value
throws:
  IllegalStateException - If the previous method invoked upon this object was neitherXmlWriter.start start nor XmlWriter.attribute attribute
throws:
  IOException - If an I/O error occurs



attribute
public void attribute(String prefix, String name, String value) throws IOException(Code)
Writes an attribute for the current element.


Parameters:
  prefix - The attribute's prefix
Parameters:
  name - The attribute's name
Parameters:
  value - The attribute's value
throws:
  IllegalStateException - If the previous method invoked upon this object was neitherXmlWriter.start start nor XmlWriter.attribute attribute
throws:
  IOException - If an I/O error occurs



attributeName
public void attributeName(String name) throws IOException(Code)
Writes an attribute name for the current element. After invoking this method, invoke the XmlWriter.attributeValue attributeValue method to write the attribute value, or invoke the XmlWriter.attributeValueTokenattributeValueToken method to write one or more space-separated value tokens.


Parameters:
  name - The attribute's name
throws:
  IllegalStateException - If the previous method invoked upon this object was neitherXmlWriter.start start nor XmlWriter.attribute attribute



attributeName
public void attributeName(String prefix, String name) throws IOException(Code)
Writes an attribute name for the current element. After invoking this method, invoke the XmlWriter.attributeValue attributeValue method to write the attribute value, or invoke the XmlWriter.attributeValueTokenattributeValueToken method to write one or more space-separated value tokens.


Parameters:
  prefix - The attribute's prefix
Parameters:
  name - The attribute's name
throws:
  IllegalStateException - If the previous method invoked upon this object was neitherXmlWriter.start start nor XmlWriter.attribute attribute



attributeUnquoted
public void attributeUnquoted(String name, String value) throws IOException(Code)
Writes an attribute (unquoted) for the current element.


Parameters:
  name - The attribute's name
Parameters:
  value - The attribute's value
throws:
  IllegalStateException - If the previous method invoked upon this object was neitherXmlWriter.start start nor XmlWriter.attribute attribute
throws:
  IOException - If an I/O error occurs



attributeUnquoted
public void attributeUnquoted(String prefix, String name, String value) throws IOException(Code)
Writes an attribute (unquoted) for the current element.


Parameters:
  prefix - The attribute's prefix
Parameters:
  name - The attribute's name
Parameters:
  value - The attribute's value
throws:
  IllegalStateException - If the previous method invoked upon this object was neitherXmlWriter.start start nor XmlWriter.attribute attribute
throws:
  IOException - If an I/O error occurs



attributeValue
public void attributeValue(String value) throws IOException(Code)
Writes a value for the current attribute.


Parameters:
  value - The attribute's value
throws:
  IllegalStateException - If the previous method invoked upon this object was notXmlWriter.attributeName attributeName



attributeValueToken
public void attributeValueToken(String token) throws IOException(Code)
Writes one token of the current attribute's value. Adjacent tokens will be separated by single space characters.


Parameters:
  token - The token to be written
throws:
  IllegalStateException - If the previous method invoked upon this object was neitherXmlWriter.attributeName attributeName norXmlWriter.attributeValueToken attributeValueToken



attributeValueUnquoted
public void attributeValueUnquoted(String value) throws IOException(Code)
Writes a value (unquoted) for the current attribute.


Parameters:
  value - The attribute's value
throws:
  IllegalStateException - If the previous method invoked upon this object was notXmlWriter.attributeName attributeName



chars
public void chars(String chars) throws IOException(Code)
Writes some character data.


Parameters:
  chars - The character data to be written
throws:
  IOException - If an I/O error occurs



chars
public void chars(CDATA chars) throws IOException(Code)



charsUnquoted
public void charsUnquoted(String chars) throws IOException(Code)
Writes some character data, skipping quoting.


Parameters:
  chars - The character data to be written
throws:
  IOException - If an I/O error occurs



charsUnquoted
public void charsUnquoted(char[] buf, int off, int len) throws IOException(Code)
Writes some character data, skipping quoting.


Parameters:
  buf - Buffer containing the character data to be written
Parameters:
  off - The offset of the data to be written
Parameters:
  len - The length of the data to be written
throws:
  IOException - If an I/O error occurs



close
public void close() throws IOException(Code)
Flushes the writer and closes the underlying byte-output stream.


throws:
  IOException - If an I/O error occurs



doctype
public void doctype(String root, String dtd) throws IOException(Code)
Writes a DOCTYPE declaration.


Parameters:
  root - The name of the root element
Parameters:
  dtd - The URI of the document-type definition
throws:
  IOException - If an I/O error occurs



end
public void end(String name) throws IOException(Code)
Writes an end tag for the named element.


Parameters:
  name - The name to be used in the end tag
throws:
  IOException - If an I/O error occurs



flush
public void flush() throws IOException(Code)
Flushes the writer.


throws:
  IOException - If an I/O error occurs



inlineLeaf
public void inlineLeaf(String name, String chars) throws IOException(Code)



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



leaf
public void leaf(String name, String chars) throws IOException(Code)
Writes a leaf element with the given character content.


Parameters:
  name - The name to be used in the start and end tags
Parameters:
  chars - The character data to be written

This method writes a start tag with the given name, followed by thegiven character data, followed by an end tag. If the charsparameter is null or the empty string then an empty tag iswritten.


throws:
  IOException - If an I/O error occurs



leaf
public void leaf(String name) throws IOException(Code)
Writes an empty leaf element.


Parameters:
  name - name to be used in the empty-element tag



setQuote
public void setQuote(char quote)(Code)
Sets the quote character to be used by this writer when writing attribute values.


Parameters:
  quote - The new quote character, either aQUOTATION MARK ('\u0022'),or an APOSTROPHE-QUOTE('\u0027')
throws:
  IllegalArgumentException - If the argument is neither of the above characters



start
public void start(String name) throws IOException(Code)
Writes a start tag for the named element.


Parameters:
  name - The name to be used in the start tag
throws:
  IOException - If an I/O error occurs



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(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)

w__w__w___._j___a__va_2_s___._c___o___m___ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.