blob: 211944fdd89e2a7e61c3951585ae9236e40d890b [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.6.0_13) on Mon Dec 07 14:17:35 IST 2009 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
WriterOutputStream (Apache Axis2 - Transport - Root 1.0.0 API)
</TITLE>
<META NAME="date" CONTENT="2009-12-07">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="WriterOutputStream (Apache Axis2 - Transport - Root 1.0.0 API)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= 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/WriterOutputStream.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/axis2/transport/base/streams/ReaderInputStream.html" title="class in org.apache.axis2.transport.base.streams"><B>PREV CLASS</B></A>&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html?org/apache/axis2/transport/base/streams/WriterOutputStream.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="WriterOutputStream.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;FIELD&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;FIELD&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.axis2.transport.base.streams</FONT>
<BR>
Class WriterOutputStream</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by ">java.io.OutputStream
<IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.axis2.transport.base.streams.WriterOutputStream</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD>java.io.Closeable, java.io.Flushable</DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>WriterOutputStream</B><DT>extends java.io.OutputStream</DL>
</PRE>
<P>
<CODE>OutputStream</CODE> implementation that transforms a byte stream to a
character stream using a specified charset encoding and writes the resulting
stream to a <CODE>Writer</CODE>. The stream is transformed using a
<CODE>CharsetDecoder</CODE> object, guaranteeing that all charset
encodings supported by the JRE are handled correctly.
<p>
The output of the <CODE>CharsetDecoder</CODE> is buffered using a fixed size buffer.
This implies that the data is written to the underlying <CODE>Writer</CODE> in chunks
that are no larger than the size of this buffer. By default, the buffer is
flushed only when it overflows or when <A HREF="../../../../../../org/apache/axis2/transport/base/streams/WriterOutputStream.html#flush()"><CODE>flush()</CODE></A> or <A HREF="../../../../../../org/apache/axis2/transport/base/streams/WriterOutputStream.html#close()"><CODE>close()</CODE></A>
is called. In general there is therefore no need to wrap the underlying <CODE>Writer</CODE>
in a <CODE>BufferedWriter</CODE>. <A HREF="../../../../../../org/apache/axis2/transport/base/streams/WriterOutputStream.html" title="class in org.apache.axis2.transport.base.streams"><CODE>WriterOutputStream</CODE></A> can also
be instructed to flush the buffer after each write operation. In this case, all
available data is written immediately to the underlying <CODE>Writer</CODE>, implying that
the current position of the <CODE>Writer</CODE> is correlated to the current position
of the <A HREF="../../../../../../org/apache/axis2/transport/base/streams/WriterOutputStream.html" title="class in org.apache.axis2.transport.base.streams"><CODE>WriterOutputStream</CODE></A>.
<p>
<A HREF="../../../../../../org/apache/axis2/transport/base/streams/WriterOutputStream.html" title="class in org.apache.axis2.transport.base.streams"><CODE>WriterOutputStream</CODE></A> implements the inverse transformation of <CODE>OutputStreamWriter</CODE>;
in the following example, writing to <tt>out2</tt> would have the same result as writing to
<tt>out</tt> directly (provided that the byte sequence is legal with respect to the
charset encoding):
<pre>
OutputStream out = ...
Charset cs = ...
OutputStreamWriter writer = new OutputStreamWriter(out, cs);
WriterOutputStream out2 = new WriterOutputStream(writer, cs);</pre>
<A HREF="../../../../../../org/apache/axis2/transport/base/streams/WriterOutputStream.html" title="class in org.apache.axis2.transport.base.streams"><CODE>WriterOutputStream</CODE></A> implements the same transformation as <CODE>InputStreamReader</CODE>,
except that the control flow is reversed: both classes transform a byte stream
into a character stream, but <CODE>InputStreamReader</CODE> pulls data from the underlying stream,
while <A HREF="../../../../../../org/apache/axis2/transport/base/streams/WriterOutputStream.html" title="class in org.apache.axis2.transport.base.streams"><CODE>WriterOutputStream</CODE></A> pushes it to the underlying stream.
<p>
Note that while there are use cases where there is no alternative to using
this class, very often the need to use this class is an indication of a flaw
in the design of the code. This class is typically used in situations where an existing
API only accepts an <CODE>OutputStream</CODE> object, but where the stream is known to represent
character data that must be decoded for further use.
<p>
Instances of <A HREF="../../../../../../org/apache/axis2/transport/base/streams/WriterOutputStream.html" title="class in org.apache.axis2.transport.base.streams"><CODE>WriterOutputStream</CODE></A> are not thread safe.
<P>
<P>
<HR>
<P>
<!-- ======== 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/axis2/transport/base/streams/WriterOutputStream.html#WriterOutputStream(java.io.Writer)">WriterOutputStream</A></B>(java.io.Writer&nbsp;writer)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a new <A HREF="../../../../../../org/apache/axis2/transport/base/streams/WriterOutputStream.html" title="class in org.apache.axis2.transport.base.streams"><CODE>WriterOutputStream</CODE></A> that uses the default character encoding
and with a default output buffer size of 1024 characters.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../../org/apache/axis2/transport/base/streams/WriterOutputStream.html#WriterOutputStream(java.io.Writer, java.nio.charset.Charset)">WriterOutputStream</A></B>(java.io.Writer&nbsp;writer,
java.nio.charset.Charset&nbsp;charset)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a new <A HREF="../../../../../../org/apache/axis2/transport/base/streams/WriterOutputStream.html" title="class in org.apache.axis2.transport.base.streams"><CODE>WriterOutputStream</CODE></A> with a default output buffer size of
1024 characters.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../../org/apache/axis2/transport/base/streams/WriterOutputStream.html#WriterOutputStream(java.io.Writer, java.nio.charset.Charset, int, boolean)">WriterOutputStream</A></B>(java.io.Writer&nbsp;writer,
java.nio.charset.Charset&nbsp;charset,
int&nbsp;bufferSize,
boolean&nbsp;writeImmediately)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a new <A HREF="../../../../../../org/apache/axis2/transport/base/streams/WriterOutputStream.html" title="class in org.apache.axis2.transport.base.streams"><CODE>WriterOutputStream</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../../org/apache/axis2/transport/base/streams/WriterOutputStream.html#WriterOutputStream(java.io.Writer, java.lang.String)">WriterOutputStream</A></B>(java.io.Writer&nbsp;writer,
java.lang.String&nbsp;charsetName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a new <A HREF="../../../../../../org/apache/axis2/transport/base/streams/WriterOutputStream.html" title="class in org.apache.axis2.transport.base.streams"><CODE>WriterOutputStream</CODE></A> with a default output buffer size of
1024 characters.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../../org/apache/axis2/transport/base/streams/WriterOutputStream.html#WriterOutputStream(java.io.Writer, java.lang.String, int, boolean)">WriterOutputStream</A></B>(java.io.Writer&nbsp;writer,
java.lang.String&nbsp;charsetName,
int&nbsp;bufferSize,
boolean&nbsp;writeImmediately)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a new <A HREF="../../../../../../org/apache/axis2/transport/base/streams/WriterOutputStream.html" title="class in org.apache.axis2.transport.base.streams"><CODE>WriterOutputStream</CODE></A>.</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/axis2/transport/base/streams/WriterOutputStream.html#close()">close</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Close the stream.</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/axis2/transport/base/streams/WriterOutputStream.html#flush()">flush</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Flush the stream.</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/axis2/transport/base/streams/WriterOutputStream.html#write(byte[])">write</A></B>(byte[]&nbsp;b)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Write bytes from the specified byte array to the stream.</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/axis2/transport/base/streams/WriterOutputStream.html#write(byte[], int, int)">write</A></B>(byte[]&nbsp;b,
int&nbsp;off,
int&nbsp;len)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Write bytes from the specified byte array to the stream.</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/axis2/transport/base/streams/WriterOutputStream.html#write(int)">write</A></B>(int&nbsp;b)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Write a single byte to the stream.</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;
<P>
<!-- ========= 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="WriterOutputStream(java.io.Writer, java.nio.charset.Charset, int, boolean)"><!-- --></A><H3>
WriterOutputStream</H3>
<PRE>
public <B>WriterOutputStream</B>(java.io.Writer&nbsp;writer,
java.nio.charset.Charset&nbsp;charset,
int&nbsp;bufferSize,
boolean&nbsp;writeImmediately)</PRE>
<DL>
<DD>Constructs a new <A HREF="../../../../../../org/apache/axis2/transport/base/streams/WriterOutputStream.html" title="class in org.apache.axis2.transport.base.streams"><CODE>WriterOutputStream</CODE></A>.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>writer</CODE> - the target <CODE>Writer</CODE><DD><CODE>charset</CODE> - the charset encoding<DD><CODE>bufferSize</CODE> - the size of the output buffer in number of characters<DD><CODE>writeImmediately</CODE> - If <tt>true</tt> the output buffer will be flushed after each
write operation, i.e. all available data will be written to the
underlying <CODE>Writer</CODE> immediately. If <tt>false</tt>, the
output buffer will only be flushed when it overflows or when
<A HREF="../../../../../../org/apache/axis2/transport/base/streams/WriterOutputStream.html#flush()"><CODE>flush()</CODE></A> or <A HREF="../../../../../../org/apache/axis2/transport/base/streams/WriterOutputStream.html#close()"><CODE>close()</CODE></A> is called.</DL>
</DL>
<HR>
<A NAME="WriterOutputStream(java.io.Writer, java.nio.charset.Charset)"><!-- --></A><H3>
WriterOutputStream</H3>
<PRE>
public <B>WriterOutputStream</B>(java.io.Writer&nbsp;writer,
java.nio.charset.Charset&nbsp;charset)</PRE>
<DL>
<DD>Constructs a new <A HREF="../../../../../../org/apache/axis2/transport/base/streams/WriterOutputStream.html" title="class in org.apache.axis2.transport.base.streams"><CODE>WriterOutputStream</CODE></A> with a default output buffer size of
1024 characters. The output buffer will only be flushed when it overflows or when
<A HREF="../../../../../../org/apache/axis2/transport/base/streams/WriterOutputStream.html#flush()"><CODE>flush()</CODE></A> or <A HREF="../../../../../../org/apache/axis2/transport/base/streams/WriterOutputStream.html#close()"><CODE>close()</CODE></A> is called.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>writer</CODE> - the target <CODE>Writer</CODE><DD><CODE>charset</CODE> - the charset encoding</DL>
</DL>
<HR>
<A NAME="WriterOutputStream(java.io.Writer, java.lang.String, int, boolean)"><!-- --></A><H3>
WriterOutputStream</H3>
<PRE>
public <B>WriterOutputStream</B>(java.io.Writer&nbsp;writer,
java.lang.String&nbsp;charsetName,
int&nbsp;bufferSize,
boolean&nbsp;writeImmediately)</PRE>
<DL>
<DD>Constructs a new <A HREF="../../../../../../org/apache/axis2/transport/base/streams/WriterOutputStream.html" title="class in org.apache.axis2.transport.base.streams"><CODE>WriterOutputStream</CODE></A>.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>writer</CODE> - the target <CODE>Writer</CODE><DD><CODE>charsetName</CODE> - the name of the charset encoding<DD><CODE>bufferSize</CODE> - the size of the output buffer in number of characters<DD><CODE>writeImmediately</CODE> - If <tt>true</tt> the output buffer will be flushed after each
write operation, i.e. all available data will be written to the
underlying <CODE>Writer</CODE> immediately. If <tt>false</tt>, the
output buffer will only be flushed when it overflows or when
<A HREF="../../../../../../org/apache/axis2/transport/base/streams/WriterOutputStream.html#flush()"><CODE>flush()</CODE></A> or <A HREF="../../../../../../org/apache/axis2/transport/base/streams/WriterOutputStream.html#close()"><CODE>close()</CODE></A> is called.</DL>
</DL>
<HR>
<A NAME="WriterOutputStream(java.io.Writer, java.lang.String)"><!-- --></A><H3>
WriterOutputStream</H3>
<PRE>
public <B>WriterOutputStream</B>(java.io.Writer&nbsp;writer,
java.lang.String&nbsp;charsetName)</PRE>
<DL>
<DD>Constructs a new <A HREF="../../../../../../org/apache/axis2/transport/base/streams/WriterOutputStream.html" title="class in org.apache.axis2.transport.base.streams"><CODE>WriterOutputStream</CODE></A> with a default output buffer size of
1024 characters. The output buffer will only be flushed when it overflows or when
<A HREF="../../../../../../org/apache/axis2/transport/base/streams/WriterOutputStream.html#flush()"><CODE>flush()</CODE></A> or <A HREF="../../../../../../org/apache/axis2/transport/base/streams/WriterOutputStream.html#close()"><CODE>close()</CODE></A> is called.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>writer</CODE> - the target <CODE>Writer</CODE><DD><CODE>charsetName</CODE> - the name of the charset encoding</DL>
</DL>
<HR>
<A NAME="WriterOutputStream(java.io.Writer)"><!-- --></A><H3>
WriterOutputStream</H3>
<PRE>
public <B>WriterOutputStream</B>(java.io.Writer&nbsp;writer)</PRE>
<DL>
<DD>Constructs a new <A HREF="../../../../../../org/apache/axis2/transport/base/streams/WriterOutputStream.html" title="class in org.apache.axis2.transport.base.streams"><CODE>WriterOutputStream</CODE></A> that uses the default character encoding
and with a default output buffer size of 1024 characters. The output buffer will only
be flushed when it overflows or when <A HREF="../../../../../../org/apache/axis2/transport/base/streams/WriterOutputStream.html#flush()"><CODE>flush()</CODE></A> or <A HREF="../../../../../../org/apache/axis2/transport/base/streams/WriterOutputStream.html#close()"><CODE>close()</CODE></A> is called.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>writer</CODE> - the target <CODE>Writer</CODE></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="write(byte[], int, int)"><!-- --></A><H3>
write</H3>
<PRE>
public void <B>write</B>(byte[]&nbsp;b,
int&nbsp;off,
int&nbsp;len)
throws java.io.IOException</PRE>
<DL>
<DD>Write bytes from the specified byte array to the stream.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>write</CODE> in class <CODE>java.io.OutputStream</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>b</CODE> - the byte array containing the bytes to write<DD><CODE>off</CODE> - the start offset in the byte array<DD><CODE>len</CODE> - the number of bytes to write
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="write(byte[])"><!-- --></A><H3>
write</H3>
<PRE>
public void <B>write</B>(byte[]&nbsp;b)
throws java.io.IOException</PRE>
<DL>
<DD>Write bytes from the specified byte array to the stream.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>write</CODE> in class <CODE>java.io.OutputStream</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>b</CODE> - the byte array containing the bytes to write
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="write(int)"><!-- --></A><H3>
write</H3>
<PRE>
public void <B>write</B>(int&nbsp;b)
throws java.io.IOException</PRE>
<DL>
<DD>Write a single byte to the stream.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>write</CODE> in class <CODE>java.io.OutputStream</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>b</CODE> - the byte to write
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="flush()"><!-- --></A><H3>
flush</H3>
<PRE>
public void <B>flush</B>()
throws java.io.IOException</PRE>
<DL>
<DD>Flush the stream. Any remaining content accumulated in the output buffer
will be written to the underlying <CODE>Writer</CODE>. After that
<CODE>Writer.flush()</CODE> will be called.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>flush</CODE> in interface <CODE>java.io.Flushable</CODE><DT><B>Overrides:</B><DD><CODE>flush</CODE> in class <CODE>java.io.OutputStream</CODE></DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="close()"><!-- --></A><H3>
close</H3>
<PRE>
public void <B>close</B>()
throws java.io.IOException</PRE>
<DL>
<DD>Close the stream. Any remaining content accumulated in the output buffer
will be written to the underlying <CODE>Writer</CODE>. After that
<CODE>Writer.close()</CODE> will be called.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>close</CODE> in interface <CODE>java.io.Closeable</CODE><DT><B>Overrides:</B><DD><CODE>close</CODE> in class <CODE>java.io.OutputStream</CODE></DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></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/WriterOutputStream.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/axis2/transport/base/streams/ReaderInputStream.html" title="class in org.apache.axis2.transport.base.streams"><B>PREV CLASS</B></A>&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html?org/apache/axis2/transport/base/streams/WriterOutputStream.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="WriterOutputStream.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;FIELD&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;FIELD&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>
Copyright &#169; 2004-2009 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.
</BODY>
</HTML>