/Prototipo/Servlet/lib/xstream-distribution-1.4.1-bin/xstream-1.4.1/docs/javadoc/com/thoughtworks/xstream/io/AbstractWriter.html

http://prototipomemoria.googlecode.com/ · HTML · 410 lines · 345 code · 43 blank · 22 comment · 0 complexity · 219b3dbdf15c71b2757e016ea1e90b5d MD5 · raw file

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!--NewPage-->
  3. <HTML>
  4. <HEAD>
  5. <!-- Generated by javadoc (build 1.6.0_26) on Thu Aug 11 04:40:24 CEST 2011 -->
  6. <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
  7. <TITLE>
  8. AbstractWriter (XStream Core 1.4.1 API)
  9. </TITLE>
  10. <META NAME="date" CONTENT="2011-08-11">
  11. <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
  12. <SCRIPT type="text/javascript">
  13. function windowTitle()
  14. {
  15. if (location.href.indexOf('is-external=true') == -1) {
  16. parent.document.title="AbstractWriter (XStream Core 1.4.1 API)";
  17. }
  18. }
  19. </SCRIPT>
  20. <NOSCRIPT>
  21. </NOSCRIPT>
  22. </HEAD>
  23. <BODY BGCOLOR="white" onload="windowTitle();">
  24. <HR>
  25. <!-- ========= START OF TOP NAVBAR ======= -->
  26. <A NAME="navbar_top"><!-- --></A>
  27. <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
  28. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  29. <TR>
  30. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  31. <A NAME="navbar_top_firstrow"><!-- --></A>
  32. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  33. <TR ALIGN="center" VALIGN="top">
  34. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  35. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  36. <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  37. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/AbstractWriter.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  38. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  39. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  40. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  41. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  42. </TR>
  43. </TABLE>
  44. </TD>
  45. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  46. </EM>
  47. </TD>
  48. </TR>
  49. <TR>
  50. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  51. &nbsp;<A HREF="../../../../com/thoughtworks/xstream/io/AbstractReader.html" title="class in com.thoughtworks.xstream.io"><B>PREV CLASS</B></A>&nbsp;
  52. &nbsp;<A HREF="../../../../com/thoughtworks/xstream/io/AttributeNameIterator.html" title="class in com.thoughtworks.xstream.io"><B>NEXT CLASS</B></A></FONT></TD>
  53. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  54. <A HREF="../../../../index.html?com/thoughtworks/xstream/io/AbstractWriter.html" target="_top"><B>FRAMES</B></A> &nbsp;
  55. &nbsp;<A HREF="AbstractWriter.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  56. &nbsp;<SCRIPT type="text/javascript">
  57. <!--
  58. if(window==top) {
  59. document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  60. }
  61. //-->
  62. </SCRIPT>
  63. <NOSCRIPT>
  64. <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
  65. </NOSCRIPT>
  66. </FONT></TD>
  67. </TR>
  68. <TR>
  69. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  70. SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  71. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  72. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  73. </TR>
  74. </TABLE>
  75. <A NAME="skip-navbar_top"></A>
  76. <!-- ========= END OF TOP NAVBAR ========= -->
  77. <HR>
  78. <!-- ======== START OF CLASS DATA ======== -->
  79. <H2>
  80. <FONT SIZE="-1">
  81. com.thoughtworks.xstream.io</FONT>
  82. <BR>
  83. Class AbstractWriter</H2>
  84. <PRE>
  85. <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
  86. <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.thoughtworks.xstream.io.AbstractWriter</B>
  87. </PRE>
  88. <DL>
  89. <DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../com/thoughtworks/xstream/io/ExtendedHierarchicalStreamWriter.html" title="interface in com.thoughtworks.xstream.io">ExtendedHierarchicalStreamWriter</A>, <A HREF="../../../../com/thoughtworks/xstream/io/HierarchicalStreamWriter.html" title="interface in com.thoughtworks.xstream.io">HierarchicalStreamWriter</A></DD>
  90. </DL>
  91. <DL>
  92. <DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../com/thoughtworks/xstream/io/json/AbstractJsonWriter.html" title="class in com.thoughtworks.xstream.io.json">AbstractJsonWriter</A>, <A HREF="../../../../com/thoughtworks/xstream/io/xml/AbstractXmlWriter.html" title="class in com.thoughtworks.xstream.io.xml">AbstractXmlWriter</A></DD>
  93. </DL>
  94. <HR>
  95. <DL>
  96. <DT><PRE>public abstract class <B>AbstractWriter</B><DT>extends <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A><DT>implements <A HREF="../../../../com/thoughtworks/xstream/io/ExtendedHierarchicalStreamWriter.html" title="interface in com.thoughtworks.xstream.io">ExtendedHierarchicalStreamWriter</A></DL>
  97. </PRE>
  98. <P>
  99. Abstract base class for all HierarchicalStreamWriter implementations. Implementations of
  100. <A HREF="../../../../com/thoughtworks/xstream/io/HierarchicalStreamWriter.html" title="interface in com.thoughtworks.xstream.io"><CODE>HierarchicalStreamWriter</CODE></A> should rather be derived from this class then implementing
  101. the interface directly.
  102. <P>
  103. <P>
  104. <DL>
  105. <DT><B>Since:</B></DT>
  106. <DD>1.4</DD>
  107. <DT><B>Author:</B></DT>
  108. <DD>J&ouml;rg Schaible</DD>
  109. </DL>
  110. <HR>
  111. <P>
  112. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  113. <A NAME="constructor_summary"><!-- --></A>
  114. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  115. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  116. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  117. <B>Constructor Summary</B></FONT></TH>
  118. </TR>
  119. <TR BGCOLOR="white" CLASS="TableRowColor">
  120. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  121. <CODE>protected </CODE></FONT></TD>
  122. <TD><CODE><B><A HREF="../../../../com/thoughtworks/xstream/io/AbstractWriter.html#AbstractWriter()">AbstractWriter</A></B>()</CODE>
  123. <BR>
  124. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an AbstractWriter with a NameCoder that does nothing.</TD>
  125. </TR>
  126. <TR BGCOLOR="white" CLASS="TableRowColor">
  127. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  128. <CODE>protected </CODE></FONT></TD>
  129. <TD><CODE><B><A HREF="../../../../com/thoughtworks/xstream/io/AbstractWriter.html#AbstractWriter(com.thoughtworks.xstream.io.naming.NameCoder)">AbstractWriter</A></B>(<A HREF="../../../../com/thoughtworks/xstream/io/naming/NameCoder.html" title="interface in com.thoughtworks.xstream.io.naming">NameCoder</A>&nbsp;nameCoder)</CODE>
  130. <BR>
  131. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an AbstractWriter with a provided <A HREF="../../../../com/thoughtworks/xstream/io/naming/NameCoder.html" title="interface in com.thoughtworks.xstream.io.naming"><CODE>NameCoder</CODE></A>.</TD>
  132. </TR>
  133. </TABLE>
  134. &nbsp;
  135. <!-- ========== METHOD SUMMARY =========== -->
  136. <A NAME="method_summary"><!-- --></A>
  137. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  138. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  139. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  140. <B>Method Summary</B></FONT></TH>
  141. </TR>
  142. <TR BGCOLOR="white" CLASS="TableRowColor">
  143. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  144. <CODE>&nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
  145. <TD><CODE><B><A HREF="../../../../com/thoughtworks/xstream/io/AbstractWriter.html#encodeAttribute(java.lang.String)">encodeAttribute</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name)</CODE>
  146. <BR>
  147. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Encode the attribute name into the name of the target format.</TD>
  148. </TR>
  149. <TR BGCOLOR="white" CLASS="TableRowColor">
  150. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  151. <CODE>&nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
  152. <TD><CODE><B><A HREF="../../../../com/thoughtworks/xstream/io/AbstractWriter.html#encodeNode(java.lang.String)">encodeNode</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name)</CODE>
  153. <BR>
  154. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Encode the node name into the name of the target format.</TD>
  155. </TR>
  156. <TR BGCOLOR="white" CLASS="TableRowColor">
  157. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  158. <CODE>&nbsp;void</CODE></FONT></TD>
  159. <TD><CODE><B><A HREF="../../../../com/thoughtworks/xstream/io/AbstractWriter.html#startNode(java.lang.String, java.lang.Class)">startNode</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name,
  160. <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&nbsp;clazz)</CODE>
  161. <BR>
  162. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  163. </TR>
  164. <TR BGCOLOR="white" CLASS="TableRowColor">
  165. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  166. <CODE>&nbsp;<A HREF="../../../../com/thoughtworks/xstream/io/HierarchicalStreamWriter.html" title="interface in com.thoughtworks.xstream.io">HierarchicalStreamWriter</A></CODE></FONT></TD>
  167. <TD><CODE><B><A HREF="../../../../com/thoughtworks/xstream/io/AbstractWriter.html#underlyingWriter()">underlyingWriter</A></B>()</CODE>
  168. <BR>
  169. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the underlying HierarchicalStreamWriter implementation.</TD>
  170. </TR>
  171. </TABLE>
  172. &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
  173. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  174. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  175. <TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
  176. </TR>
  177. <TR BGCOLOR="white" CLASS="TableRowColor">
  178. <TD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
  179. </TR>
  180. </TABLE>
  181. &nbsp;<A NAME="methods_inherited_from_class_com.thoughtworks.xstream.io.HierarchicalStreamWriter"><!-- --></A>
  182. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  183. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  184. <TH ALIGN="left"><B>Methods inherited from interface com.thoughtworks.xstream.io.<A HREF="../../../../com/thoughtworks/xstream/io/HierarchicalStreamWriter.html" title="interface in com.thoughtworks.xstream.io">HierarchicalStreamWriter</A></B></TH>
  185. </TR>
  186. <TR BGCOLOR="white" CLASS="TableRowColor">
  187. <TD><CODE><A HREF="../../../../com/thoughtworks/xstream/io/HierarchicalStreamWriter.html#addAttribute(java.lang.String, java.lang.String)">addAttribute</A>, <A HREF="../../../../com/thoughtworks/xstream/io/HierarchicalStreamWriter.html#close()">close</A>, <A HREF="../../../../com/thoughtworks/xstream/io/HierarchicalStreamWriter.html#endNode()">endNode</A>, <A HREF="../../../../com/thoughtworks/xstream/io/HierarchicalStreamWriter.html#flush()">flush</A>, <A HREF="../../../../com/thoughtworks/xstream/io/HierarchicalStreamWriter.html#setValue(java.lang.String)">setValue</A>, <A HREF="../../../../com/thoughtworks/xstream/io/HierarchicalStreamWriter.html#startNode(java.lang.String)">startNode</A></CODE></TD>
  188. </TR>
  189. </TABLE>
  190. &nbsp;
  191. <P>
  192. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  193. <A NAME="constructor_detail"><!-- --></A>
  194. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  195. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  196. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  197. <B>Constructor Detail</B></FONT></TH>
  198. </TR>
  199. </TABLE>
  200. <A NAME="AbstractWriter()"><!-- --></A><H3>
  201. AbstractWriter</H3>
  202. <PRE>
  203. protected <B>AbstractWriter</B>()</PRE>
  204. <DL>
  205. <DD>Creates an AbstractWriter with a NameCoder that does nothing.
  206. <P>
  207. <DL>
  208. <DT><B>Since:</B></DT>
  209. <DD>1.4</DD>
  210. </DL>
  211. </DL>
  212. <HR>
  213. <A NAME="AbstractWriter(com.thoughtworks.xstream.io.naming.NameCoder)"><!-- --></A><H3>
  214. AbstractWriter</H3>
  215. <PRE>
  216. protected <B>AbstractWriter</B>(<A HREF="../../../../com/thoughtworks/xstream/io/naming/NameCoder.html" title="interface in com.thoughtworks.xstream.io.naming">NameCoder</A>&nbsp;nameCoder)</PRE>
  217. <DL>
  218. <DD>Creates an AbstractWriter with a provided <A HREF="../../../../com/thoughtworks/xstream/io/naming/NameCoder.html" title="interface in com.thoughtworks.xstream.io.naming"><CODE>NameCoder</CODE></A>.
  219. <P>
  220. <DL>
  221. <DT><B>Parameters:</B><DD><CODE>nameCoder</CODE> - the name coder used to write names in the target format<DT><B>Since:</B></DT>
  222. <DD>1.4</DD>
  223. </DL>
  224. </DL>
  225. <!-- ============ METHOD DETAIL ========== -->
  226. <A NAME="method_detail"><!-- --></A>
  227. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  228. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  229. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  230. <B>Method Detail</B></FONT></TH>
  231. </TR>
  232. </TABLE>
  233. <A NAME="startNode(java.lang.String, java.lang.Class)"><!-- --></A><H3>
  234. startNode</H3>
  235. <PRE>
  236. public void <B>startNode</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name,
  237. <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&nbsp;clazz)</PRE>
  238. <DL>
  239. <DD>
  240. <P>
  241. <DD><DL>
  242. <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/thoughtworks/xstream/io/ExtendedHierarchicalStreamWriter.html#startNode(java.lang.String, java.lang.Class)">startNode</A></CODE> in interface <CODE><A HREF="../../../../com/thoughtworks/xstream/io/ExtendedHierarchicalStreamWriter.html" title="interface in com.thoughtworks.xstream.io">ExtendedHierarchicalStreamWriter</A></CODE></DL>
  243. </DD>
  244. <DD><DL>
  245. </DL>
  246. </DD>
  247. </DL>
  248. <HR>
  249. <A NAME="underlyingWriter()"><!-- --></A><H3>
  250. underlyingWriter</H3>
  251. <PRE>
  252. public <A HREF="../../../../com/thoughtworks/xstream/io/HierarchicalStreamWriter.html" title="interface in com.thoughtworks.xstream.io">HierarchicalStreamWriter</A> <B>underlyingWriter</B>()</PRE>
  253. <DL>
  254. <DD>Return the underlying HierarchicalStreamWriter implementation.
  255. <p>If a Converter needs to access methods of a specific HierarchicalStreamWriter implementation that are not
  256. defined in the HierarchicalStreamWriter interface, it should call this method before casting. This is because
  257. the writer passed to the Converter is often wrapped/decorated by another implementation to provide additional
  258. functionality (such as XPath tracking).</p>
  259. <p>For example:</p>
  260. <pre>MySpecificWriter mySpecificWriter = (MySpecificWriter)writer; <b>// INCORRECT!</b>
  261. mySpecificWriter.doSomethingSpecific();</pre>
  262. <pre>MySpecificWriter mySpecificWriter = (MySpecificWriter)writer.underlyingWriter(); <b>// CORRECT!</b>
  263. mySpecificWriter.doSomethingSpecific();</pre>
  264. <p>Implementations of HierarchicalStreamWriter should return 'this', unless they are a decorator, in which case
  265. they should delegate to whatever they are wrapping.</p>
  266. <P>
  267. <DD><DL>
  268. <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/thoughtworks/xstream/io/HierarchicalStreamWriter.html#underlyingWriter()">underlyingWriter</A></CODE> in interface <CODE><A HREF="../../../../com/thoughtworks/xstream/io/HierarchicalStreamWriter.html" title="interface in com.thoughtworks.xstream.io">HierarchicalStreamWriter</A></CODE></DL>
  269. </DD>
  270. <DD><DL>
  271. </DL>
  272. </DD>
  273. </DL>
  274. <HR>
  275. <A NAME="encodeNode(java.lang.String)"><!-- --></A><H3>
  276. encodeNode</H3>
  277. <PRE>
  278. public <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>encodeNode</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name)</PRE>
  279. <DL>
  280. <DD>Encode the node name into the name of the target format.
  281. <P>
  282. <DD><DL>
  283. </DL>
  284. </DD>
  285. <DD><DL>
  286. <DT><B>Parameters:</B><DD><CODE>name</CODE> - the original name
  287. <DT><B>Returns:</B><DD>the name in the target format<DT><B>Since:</B></DT>
  288. <DD>1.4</DD>
  289. </DL>
  290. </DD>
  291. </DL>
  292. <HR>
  293. <A NAME="encodeAttribute(java.lang.String)"><!-- --></A><H3>
  294. encodeAttribute</H3>
  295. <PRE>
  296. public <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>encodeAttribute</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name)</PRE>
  297. <DL>
  298. <DD>Encode the attribute name into the name of the target format.
  299. <P>
  300. <DD><DL>
  301. </DL>
  302. </DD>
  303. <DD><DL>
  304. <DT><B>Parameters:</B><DD><CODE>name</CODE> - the original name
  305. <DT><B>Returns:</B><DD>the name in the target format<DT><B>Since:</B></DT>
  306. <DD>1.4</DD>
  307. </DL>
  308. </DD>
  309. </DL>
  310. <!-- ========= END OF CLASS DATA ========= -->
  311. <HR>
  312. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  313. <A NAME="navbar_bottom"><!-- --></A>
  314. <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
  315. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  316. <TR>
  317. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  318. <A NAME="navbar_bottom_firstrow"><!-- --></A>
  319. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  320. <TR ALIGN="center" VALIGN="top">
  321. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  322. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  323. <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  324. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/AbstractWriter.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  325. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  326. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  327. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  328. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  329. </TR>
  330. </TABLE>
  331. </TD>
  332. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  333. </EM>
  334. </TD>
  335. </TR>
  336. <TR>
  337. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  338. &nbsp;<A HREF="../../../../com/thoughtworks/xstream/io/AbstractReader.html" title="class in com.thoughtworks.xstream.io"><B>PREV CLASS</B></A>&nbsp;
  339. &nbsp;<A HREF="../../../../com/thoughtworks/xstream/io/AttributeNameIterator.html" title="class in com.thoughtworks.xstream.io"><B>NEXT CLASS</B></A></FONT></TD>
  340. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  341. <A HREF="../../../../index.html?com/thoughtworks/xstream/io/AbstractWriter.html" target="_top"><B>FRAMES</B></A> &nbsp;
  342. &nbsp;<A HREF="AbstractWriter.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  343. &nbsp;<SCRIPT type="text/javascript">
  344. <!--
  345. if(window==top) {
  346. document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  347. }
  348. //-->
  349. </SCRIPT>
  350. <NOSCRIPT>
  351. <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
  352. </NOSCRIPT>
  353. </FONT></TD>
  354. </TR>
  355. <TR>
  356. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  357. SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  358. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  359. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  360. </TR>
  361. </TABLE>
  362. <A NAME="skip-navbar_bottom"></A>
  363. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  364. <HR>
  365. Copyright &#169; 2004-2011 <a href="http://xstream.codehaus.org">XStream</a>. All Rights Reserved.
  366. </BODY>
  367. </HTML>