blob: b89aa284f8a88ab27f8923b705d14eb13b85e611 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_18) on Sun Apr 01 21:18:35 PDT 2012 -->
<TITLE>
SerializerTraceWriter
</TITLE>
<META NAME="keywords" CONTENT="org.apache.xml.serializer.SerializerTraceWriter class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="SerializerTraceWriter";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/SerializerTraceWriter.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/apache/xml/serializer/SerializerTrace.html" title="interface in org.apache.xml.serializer"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/xml/serializer/ToHTMLSAXHandler.html" title="class in org.apache.xml.serializer"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/apache/xml/serializer/SerializerTraceWriter.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="SerializerTraceWriter.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.xml.serializer</FONT>
<BR>
Class SerializerTraceWriter</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by ">java.io.Writer
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.xml.serializer.SerializerTraceWriter</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD>java.io.Closeable, java.io.Flushable, java.lang.Appendable, <A HREF="../../../../org/apache/xml/serializer/WriterChain.html" title="interface in org.apache.xml.serializer">WriterChain</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>final class <A HREF="../../../../src-html/org/apache/xml/serializer/SerializerTraceWriter.html#line.45"><B>SerializerTraceWriter</B></A><DT>extends java.io.Writer<DT>implements <A HREF="../../../../org/apache/xml/serializer/WriterChain.html" title="interface in org.apache.xml.serializer">WriterChain</A></DL>
</PRE>
<P>
This class wraps the real writer, it only purpose is to send
CHARACTERTOSTREAM events to the trace listener.
Each method immediately sends the call to the wrapped writer unchanged, but
in addition it collects characters to be issued to a trace listener.
In this way the trace
listener knows what characters have been written to the output Writer.
There may still be differences in what the trace events say is going to the
output writer and what is really going there. These differences will be due
to the fact that this class is UTF-8 encoding before emiting the trace event
and the underlying writer may not be UTF-8 encoding. There may also be
encoding differences. So the main pupose of this class is to provide a
resonable facsimile of the true output.
<P>
<P>
<HR>
<P>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/SerializerTraceWriter.html#buf">buf</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Internal buffer to collect the characters to go to the trace listener.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/SerializerTraceWriter.html#buf_length">buf_length</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The size of the internal buffer, just to keep too many
events from being sent to the tracer</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/SerializerTraceWriter.html#count">count</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;How many bytes have been collected and still need to go to trace
listener.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;<A HREF="../../../../org/apache/xml/serializer/SerializerTrace.html" title="interface in org.apache.xml.serializer">SerializerTrace</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/SerializerTraceWriter.html#m_tracer">m_tracer</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The tracer to send events to</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;java.io.Writer</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/SerializerTraceWriter.html#m_writer">m_writer</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The real writer to immediately write to.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="fields_inherited_from_class_java.io.Writer"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Fields inherited from class java.io.Writer</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>lock</CODE></TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/SerializerTraceWriter.html#SerializerTraceWriter(java.io.Writer, org.apache.xml.serializer.SerializerTrace)">SerializerTraceWriter</A></B>(java.io.Writer&nbsp;out,
<A HREF="../../../../org/apache/xml/serializer/SerializerTrace.html" title="interface in org.apache.xml.serializer">SerializerTrace</A>&nbsp;tracer)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/SerializerTraceWriter.html#close()">close</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Flush the internal buffer and close the Writer</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/SerializerTraceWriter.html#flush()">flush</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Flush the internal buffer and flush the Writer</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/SerializerTraceWriter.html#flushBuffer()">flushBuffer</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Flush out the collected characters by sending them to the trace
listener.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.io.OutputStream</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/SerializerTraceWriter.html#getOutputStream()">getOutputStream</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the OutputStream that is the at the end of the
chain of writers.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.io.Writer</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/SerializerTraceWriter.html#getWriter()">getWriter</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the writer that this one directly wraps.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/SerializerTraceWriter.html#setBufferSize(int)">setBufferSize</A></B>(int&nbsp;size)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates or replaces the internal buffer, and makes sure it has a few
extra bytes slight overflow of the last UTF8 encoded character.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/SerializerTraceWriter.html#write(char[], int, int)">write</A></B>(char[]&nbsp;chars,
int&nbsp;start,
int&nbsp;length)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Write a portion of an array of characters.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/SerializerTraceWriter.html#write(int)">write</A></B>(int&nbsp;c)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Write a single character.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/SerializerTraceWriter.html#write(java.lang.String)">write</A></B>(java.lang.String&nbsp;s)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Write a string.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.io.Writer"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.io.Writer</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>append, append, append, write, write</CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.apache.xml.serializer.WriterChain"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from interface org.apache.xml.serializer.<A HREF="../../../../org/apache/xml/serializer/WriterChain.html" title="interface in org.apache.xml.serializer">WriterChain</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../org/apache/xml/serializer/WriterChain.html#write(char[])">write</A>, <A HREF="../../../../org/apache/xml/serializer/WriterChain.html#write(java.lang.String, int, int)">write</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="m_writer"><!-- --></A><H3>
m_writer</H3>
<PRE>
private final java.io.Writer <A HREF="../../../../src-html/org/apache/xml/serializer/SerializerTraceWriter.html#line.52"><B>m_writer</B></A></PRE>
<DL>
<DD>The real writer to immediately write to.
This reference may be null, in which case nothing is written out, but
only the trace events are fired for output.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="m_tracer"><!-- --></A><H3>
m_tracer</H3>
<PRE>
private final <A HREF="../../../../org/apache/xml/serializer/SerializerTrace.html" title="interface in org.apache.xml.serializer">SerializerTrace</A> <A HREF="../../../../src-html/org/apache/xml/serializer/SerializerTraceWriter.html#line.55"><B>m_tracer</B></A></PRE>
<DL>
<DD>The tracer to send events to
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="buf_length"><!-- --></A><H3>
buf_length</H3>
<PRE>
private int <A HREF="../../../../src-html/org/apache/xml/serializer/SerializerTraceWriter.html#line.60"><B>buf_length</B></A></PRE>
<DL>
<DD>The size of the internal buffer, just to keep too many
events from being sent to the tracer
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="buf"><!-- --></A><H3>
buf</H3>
<PRE>
private byte[] <A HREF="../../../../src-html/org/apache/xml/serializer/SerializerTraceWriter.html#line.66"><B>buf</B></A></PRE>
<DL>
<DD>Internal buffer to collect the characters to go to the trace listener.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="count"><!-- --></A><H3>
count</H3>
<PRE>
private int <A HREF="../../../../src-html/org/apache/xml/serializer/SerializerTraceWriter.html#line.72"><B>count</B></A></PRE>
<DL>
<DD>How many bytes have been collected and still need to go to trace
listener.
<P>
<DL>
</DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="SerializerTraceWriter(java.io.Writer, org.apache.xml.serializer.SerializerTrace)"><!-- --></A><H3>
SerializerTraceWriter</H3>
<PRE>
public <A HREF="../../../../src-html/org/apache/xml/serializer/SerializerTraceWriter.html#line.97"><B>SerializerTraceWriter</B></A>(java.io.Writer&nbsp;out,
<A HREF="../../../../org/apache/xml/serializer/SerializerTrace.html" title="interface in org.apache.xml.serializer">SerializerTrace</A>&nbsp;tracer)</PRE>
<DL>
<DD>Constructor.
If the writer passed in is null, then this SerializerTraceWriter will
only signal trace events of what would have been written to that writer.
If the writer passed in is not null then the trace events will mirror
what is going to that writer. In this way tools, such as a debugger, can
gather information on what is being written out.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>out</CODE> - the Writer to write to (possibly null)<DD><CODE>tracer</CODE> - the tracer to inform that characters are being written</DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="setBufferSize(int)"><!-- --></A><H3>
setBufferSize</H3>
<PRE>
private void <A HREF="../../../../src-html/org/apache/xml/serializer/SerializerTraceWriter.html#line.79"><B>setBufferSize</B></A>(int&nbsp;size)</PRE>
<DL>
<DD>Creates or replaces the internal buffer, and makes sure it has a few
extra bytes slight overflow of the last UTF8 encoded character.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>size</CODE> - </DL>
</DD>
</DL>
<HR>
<A NAME="flushBuffer()"><!-- --></A><H3>
flushBuffer</H3>
<PRE>
private void <A HREF="../../../../src-html/org/apache/xml/serializer/SerializerTraceWriter.html#line.112"><B>flushBuffer</B></A>()
throws java.io.IOException</PRE>
<DL>
<DD>Flush out the collected characters by sending them to the trace
listener. These characters are never written to the real writer
(m_writer) because that has already happened with every method
call. This method simple informs the listener of what has already
happened.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="flush()"><!-- --></A><H3>
flush</H3>
<PRE>
public void <A HREF="../../../../src-html/org/apache/xml/serializer/SerializerTraceWriter.html#line.137"><B>flush</B></A>()
throws java.io.IOException</PRE>
<DL>
<DD>Flush the internal buffer and flush the Writer
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>flush</CODE> in interface <CODE>java.io.Flushable</CODE><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/xml/serializer/WriterChain.html#flush()">flush</A></CODE> in interface <CODE><A HREF="../../../../org/apache/xml/serializer/WriterChain.html" title="interface in org.apache.xml.serializer">WriterChain</A></CODE><DT><B>Specified by:</B><DD><CODE>flush</CODE> in class <CODE>java.io.Writer</CODE></DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE><DT><B>See Also:</B><DD><CODE>Writer.flush()</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="close()"><!-- --></A><H3>
close</H3>
<PRE>
public void <A HREF="../../../../src-html/org/apache/xml/serializer/SerializerTraceWriter.html#line.151"><B>close</B></A>()
throws java.io.IOException</PRE>
<DL>
<DD>Flush the internal buffer and close the Writer
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>close</CODE> in interface <CODE>java.io.Closeable</CODE><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/xml/serializer/WriterChain.html#close()">close</A></CODE> in interface <CODE><A HREF="../../../../org/apache/xml/serializer/WriterChain.html" title="interface in org.apache.xml.serializer">WriterChain</A></CODE><DT><B>Specified by:</B><DD><CODE>close</CODE> in class <CODE>java.io.Writer</CODE></DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE><DT><B>See Also:</B><DD><CODE>Writer.close()</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="write(int)"><!-- --></A><H3>
write</H3>
<PRE>
public void <A HREF="../../../../src-html/org/apache/xml/serializer/SerializerTraceWriter.html#line.173"><B>write</B></A>(int&nbsp;c)
throws java.io.IOException</PRE>
<DL>
<DD>Write a single character. The character to be written is contained in
the 16 low-order bits of the given integer value; the 16 high-order bits
are ignored.
<p> Subclasses that intend to support efficient single-character output
should override this method.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/xml/serializer/WriterChain.html#write(int)">write</A></CODE> in interface <CODE><A HREF="../../../../org/apache/xml/serializer/WriterChain.html" title="interface in org.apache.xml.serializer">WriterChain</A></CODE><DT><B>Overrides:</B><DD><CODE>write</CODE> in class <CODE>java.io.Writer</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>c</CODE> - int specifying a character to be written.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - If an I/O error occurs</DL>
</DD>
</DL>
<HR>
<A NAME="write(char[], int, int)"><!-- --></A><H3>
write</H3>
<PRE>
public void <A HREF="../../../../src-html/org/apache/xml/serializer/SerializerTraceWriter.html#line.215"><B>write</B></A>(char[]&nbsp;chars,
int&nbsp;start,
int&nbsp;length)
throws java.io.IOException</PRE>
<DL>
<DD>Write a portion of an array of characters.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/xml/serializer/WriterChain.html#write(char[], int, int)">write</A></CODE> in interface <CODE><A HREF="../../../../org/apache/xml/serializer/WriterChain.html" title="interface in org.apache.xml.serializer">WriterChain</A></CODE><DT><B>Specified by:</B><DD><CODE>write</CODE> in class <CODE>java.io.Writer</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>chars</CODE> - Array of characters<DD><CODE>start</CODE> - Offset from which to start writing characters<DD><CODE>length</CODE> - Number of characters to write
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - If an I/O error occurs
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="write(java.lang.String)"><!-- --></A><H3>
write</H3>
<PRE>
public void <A HREF="../../../../src-html/org/apache/xml/serializer/SerializerTraceWriter.html#line.271"><B>write</B></A>(java.lang.String&nbsp;s)
throws java.io.IOException</PRE>
<DL>
<DD>Write a string.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/xml/serializer/WriterChain.html#write(java.lang.String)">write</A></CODE> in interface <CODE><A HREF="../../../../org/apache/xml/serializer/WriterChain.html" title="interface in org.apache.xml.serializer">WriterChain</A></CODE><DT><B>Overrides:</B><DD><CODE>write</CODE> in class <CODE>java.io.Writer</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>s</CODE> - String to be written
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - If an I/O error occurs</DL>
</DD>
</DL>
<HR>
<A NAME="getWriter()"><!-- --></A><H3>
getWriter</H3>
<PRE>
public java.io.Writer <A HREF="../../../../src-html/org/apache/xml/serializer/SerializerTraceWriter.html#line.325"><B>getWriter</B></A>()</PRE>
<DL>
<DD>Get the writer that this one directly wraps.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/xml/serializer/WriterChain.html#getWriter()">getWriter</A></CODE> in interface <CODE><A HREF="../../../../org/apache/xml/serializer/WriterChain.html" title="interface in org.apache.xml.serializer">WriterChain</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getOutputStream()"><!-- --></A><H3>
getOutputStream</H3>
<PRE>
public java.io.OutputStream <A HREF="../../../../src-html/org/apache/xml/serializer/SerializerTraceWriter.html#line.334"><B>getOutputStream</B></A>()</PRE>
<DL>
<DD>Get the OutputStream that is the at the end of the
chain of writers.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/xml/serializer/WriterChain.html#getOutputStream()">getOutputStream</A></CODE> in interface <CODE><A HREF="../../../../org/apache/xml/serializer/WriterChain.html" title="interface in org.apache.xml.serializer">WriterChain</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/SerializerTraceWriter.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/apache/xml/serializer/SerializerTrace.html" title="interface in org.apache.xml.serializer"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/xml/serializer/ToHTMLSAXHandler.html" title="class in org.apache.xml.serializer"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/apache/xml/serializer/SerializerTraceWriter.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="SerializerTraceWriter.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>