blob: d029c1b03c698b92f6abeb968232c6135e095b97 [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>
ReaderInputStream (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="ReaderInputStream (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/ReaderInputStream.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;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../../../org/apache/axis2/transport/base/streams/WriterOutputStream.html" title="class in org.apache.axis2.transport.base.streams"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html?org/apache/axis2/transport/base/streams/ReaderInputStream.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="ReaderInputStream.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 ReaderInputStream</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by ">java.io.InputStream
<IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.axis2.transport.base.streams.ReaderInputStream</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD>java.io.Closeable</DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>ReaderInputStream</B><DT>extends java.io.InputStream</DL>
</PRE>
<P>
<CODE>InputStream</CODE> implementation that reads a character stream from a <CODE>Reader</CODE>
and transforms it to a byte stream using a specified charset encoding. The stream
is transformed using a <CODE>CharsetEncoder</CODE> object, guaranteeing that all charset
encodings supported by the JRE are handled correctly. In particular for charsets such as
UTF-16, the implementation ensures that one and only one byte order marker
is produced.
<p>
Since in general it is not possible to predict the number of characters to be read from the
<CODE>Reader</CODE> to satisfy a read request on the <A HREF="../../../../../../org/apache/axis2/transport/base/streams/ReaderInputStream.html" title="class in org.apache.axis2.transport.base.streams"><CODE>ReaderInputStream</CODE></A>, all reads from
the <CODE>Reader</CODE> are buffered. There is therefore no well defined correlation
between the current position of the <CODE>Reader</CODE> and that of the <A HREF="../../../../../../org/apache/axis2/transport/base/streams/ReaderInputStream.html" title="class in org.apache.axis2.transport.base.streams"><CODE>ReaderInputStream</CODE></A>.
This also implies that in general there is no need to wrap the underlying <CODE>Reader</CODE>
in a <CODE>BufferedReader</CODE>.
<p>
<A HREF="../../../../../../org/apache/axis2/transport/base/streams/ReaderInputStream.html" title="class in org.apache.axis2.transport.base.streams"><CODE>ReaderInputStream</CODE></A> implements the inverse transformation of <CODE>InputStreamReader</CODE>;
in the following example, reading from <tt>in2</tt> would return the same byte
sequence as reading from <tt>in</tt> (provided that the initial byte sequence is legal
with respect to the charset encoding):
<pre>
InputStream in = ...
Charset cs = ...
InputStreamReader reader = new InputStreamReader(in, cs);
ReaderInputStream in2 = new ReaderInputStream(reader, cs);</pre>
<A HREF="../../../../../../org/apache/axis2/transport/base/streams/ReaderInputStream.html" title="class in org.apache.axis2.transport.base.streams"><CODE>ReaderInputStream</CODE></A> implements the same transformation as <CODE>OutputStreamWriter</CODE>,
except that the control flow is reversed: both classes transform a character stream
into a byte stream, but <CODE>OutputStreamWriter</CODE> pushes data to the underlying stream,
while <A HREF="../../../../../../org/apache/axis2/transport/base/streams/ReaderInputStream.html" title="class in org.apache.axis2.transport.base.streams"><CODE>ReaderInputStream</CODE></A> pulls it from 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>InputStream</CODE>, but where the most natural way to produce the data
is as a character stream, i.e. by providing a <CODE>Reader</CODE> instance. An example of a situation
where this problem may appear is when implementing the <CODE>DataSource</CODE>
interface from the Java Activation Framework.
<p>
Given the fact that the <CODE>Reader</CODE> class doesn't provide any way to predict whether the next
read operation will block or not, it is not possible to provide a meaningful
implementation of the <CODE>InputStream.available()</CODE> method. A call to this method
will always return 0. Also, this class doesn't support <CODE>InputStream.mark(int)</CODE>.
<p>
Instances of <A HREF="../../../../../../org/apache/axis2/transport/base/streams/ReaderInputStream.html" title="class in org.apache.axis2.transport.base.streams"><CODE>ReaderInputStream</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/ReaderInputStream.html#ReaderInputStream(java.io.Reader)">ReaderInputStream</A></B>(java.io.Reader&nbsp;reader)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct a new <A HREF="../../../../../../org/apache/axis2/transport/base/streams/ReaderInputStream.html" title="class in org.apache.axis2.transport.base.streams"><CODE>ReaderInputStream</CODE></A> that uses the default character encoding
with a default input buffer size of 1024 characters.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../../org/apache/axis2/transport/base/streams/ReaderInputStream.html#ReaderInputStream(java.io.Reader, java.nio.charset.Charset)">ReaderInputStream</A></B>(java.io.Reader&nbsp;reader,
java.nio.charset.Charset&nbsp;charset)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct a new <A HREF="../../../../../../org/apache/axis2/transport/base/streams/ReaderInputStream.html" title="class in org.apache.axis2.transport.base.streams"><CODE>ReaderInputStream</CODE></A> with a default input buffer size of
1024 characters.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../../org/apache/axis2/transport/base/streams/ReaderInputStream.html#ReaderInputStream(java.io.Reader, java.nio.charset.Charset, int)">ReaderInputStream</A></B>(java.io.Reader&nbsp;reader,
java.nio.charset.Charset&nbsp;charset,
int&nbsp;bufferSize)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct a new <A HREF="../../../../../../org/apache/axis2/transport/base/streams/ReaderInputStream.html" title="class in org.apache.axis2.transport.base.streams"><CODE>ReaderInputStream</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../../org/apache/axis2/transport/base/streams/ReaderInputStream.html#ReaderInputStream(java.io.Reader, java.lang.String)">ReaderInputStream</A></B>(java.io.Reader&nbsp;reader,
java.lang.String&nbsp;charsetName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct a new <A HREF="../../../../../../org/apache/axis2/transport/base/streams/ReaderInputStream.html" title="class in org.apache.axis2.transport.base.streams"><CODE>ReaderInputStream</CODE></A> with a default input buffer size of
1024 characters.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../../org/apache/axis2/transport/base/streams/ReaderInputStream.html#ReaderInputStream(java.io.Reader, java.lang.String, int)">ReaderInputStream</A></B>(java.io.Reader&nbsp;reader,
java.lang.String&nbsp;charsetName,
int&nbsp;bufferSize)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct a new <A HREF="../../../../../../org/apache/axis2/transport/base/streams/ReaderInputStream.html" title="class in org.apache.axis2.transport.base.streams"><CODE>ReaderInputStream</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/ReaderInputStream.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;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/axis2/transport/base/streams/ReaderInputStream.html#read()">read</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Read a single byte.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/axis2/transport/base/streams/ReaderInputStream.html#read(byte[])">read</A></B>(byte[]&nbsp;b)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Read the specified number of bytes into an array.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/axis2/transport/base/streams/ReaderInputStream.html#read(byte[], int, int)">read</A></B>(byte[]&nbsp;b,
int&nbsp;off,
int&nbsp;len)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Read the specified number of bytes into an array.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.io.InputStream"><!-- --></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.InputStream</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>available, mark, markSupported, reset, skip</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;
<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="ReaderInputStream(java.io.Reader, java.nio.charset.Charset, int)"><!-- --></A><H3>
ReaderInputStream</H3>
<PRE>
public <B>ReaderInputStream</B>(java.io.Reader&nbsp;reader,
java.nio.charset.Charset&nbsp;charset,
int&nbsp;bufferSize)</PRE>
<DL>
<DD>Construct a new <A HREF="../../../../../../org/apache/axis2/transport/base/streams/ReaderInputStream.html" title="class in org.apache.axis2.transport.base.streams"><CODE>ReaderInputStream</CODE></A>.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>reader</CODE> - the target <CODE>Reader</CODE><DD><CODE>charset</CODE> - the charset encoding<DD><CODE>bufferSize</CODE> - the size of the input buffer in number of characters</DL>
</DL>
<HR>
<A NAME="ReaderInputStream(java.io.Reader, java.nio.charset.Charset)"><!-- --></A><H3>
ReaderInputStream</H3>
<PRE>
public <B>ReaderInputStream</B>(java.io.Reader&nbsp;reader,
java.nio.charset.Charset&nbsp;charset)</PRE>
<DL>
<DD>Construct a new <A HREF="../../../../../../org/apache/axis2/transport/base/streams/ReaderInputStream.html" title="class in org.apache.axis2.transport.base.streams"><CODE>ReaderInputStream</CODE></A> with a default input buffer size of
1024 characters.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>reader</CODE> - the target <CODE>Reader</CODE><DD><CODE>charset</CODE> - the charset encoding</DL>
</DL>
<HR>
<A NAME="ReaderInputStream(java.io.Reader, java.lang.String, int)"><!-- --></A><H3>
ReaderInputStream</H3>
<PRE>
public <B>ReaderInputStream</B>(java.io.Reader&nbsp;reader,
java.lang.String&nbsp;charsetName,
int&nbsp;bufferSize)</PRE>
<DL>
<DD>Construct a new <A HREF="../../../../../../org/apache/axis2/transport/base/streams/ReaderInputStream.html" title="class in org.apache.axis2.transport.base.streams"><CODE>ReaderInputStream</CODE></A>.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>reader</CODE> - the target <CODE>Reader</CODE><DD><CODE>charsetName</CODE> - the name of the charset encoding<DD><CODE>bufferSize</CODE> - the size of the input buffer in number of characters</DL>
</DL>
<HR>
<A NAME="ReaderInputStream(java.io.Reader, java.lang.String)"><!-- --></A><H3>
ReaderInputStream</H3>
<PRE>
public <B>ReaderInputStream</B>(java.io.Reader&nbsp;reader,
java.lang.String&nbsp;charsetName)</PRE>
<DL>
<DD>Construct a new <A HREF="../../../../../../org/apache/axis2/transport/base/streams/ReaderInputStream.html" title="class in org.apache.axis2.transport.base.streams"><CODE>ReaderInputStream</CODE></A> with a default input buffer size of
1024 characters.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>reader</CODE> - the target <CODE>Reader</CODE><DD><CODE>charsetName</CODE> - the name of the charset encoding</DL>
</DL>
<HR>
<A NAME="ReaderInputStream(java.io.Reader)"><!-- --></A><H3>
ReaderInputStream</H3>
<PRE>
public <B>ReaderInputStream</B>(java.io.Reader&nbsp;reader)</PRE>
<DL>
<DD>Construct a new <A HREF="../../../../../../org/apache/axis2/transport/base/streams/ReaderInputStream.html" title="class in org.apache.axis2.transport.base.streams"><CODE>ReaderInputStream</CODE></A> that uses the default character encoding
with a default input buffer size of 1024 characters.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>reader</CODE> - the target <CODE>Reader</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="read(byte[], int, int)"><!-- --></A><H3>
read</H3>
<PRE>
public int <B>read</B>(byte[]&nbsp;b,
int&nbsp;off,
int&nbsp;len)
throws java.io.IOException</PRE>
<DL>
<DD>Read the specified number of bytes into an array.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>read</CODE> in class <CODE>java.io.InputStream</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>b</CODE> - the byte array to read into<DD><CODE>off</CODE> - the offset to start reading bytes into<DD><CODE>len</CODE> - the number of bytes to read
<DT><B>Returns:</B><DD>the number of bytes read or <code>-1</code>
if the end of the stream has been reached
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="read(byte[])"><!-- --></A><H3>
read</H3>
<PRE>
public int <B>read</B>(byte[]&nbsp;b)
throws java.io.IOException</PRE>
<DL>
<DD>Read the specified number of bytes into an array.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>read</CODE> in class <CODE>java.io.InputStream</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>b</CODE> - the byte array to read into
<DT><B>Returns:</B><DD>the number of bytes read or <code>-1</code>
if the end of the stream has been reached
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="read()"><!-- --></A><H3>
read</H3>
<PRE>
public int <B>read</B>()
throws java.io.IOException</PRE>
<DL>
<DD>Read a single byte.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>read</CODE> in class <CODE>java.io.InputStream</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>either the byte read or <code>-1</code> if the end of the stream
has been reached
<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. This method will cause the underlying <CODE>Reader</CODE>
to be closed.
<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.InputStream</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/ReaderInputStream.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;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../../../org/apache/axis2/transport/base/streams/WriterOutputStream.html" title="class in org.apache.axis2.transport.base.streams"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html?org/apache/axis2/transport/base/streams/ReaderInputStream.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="ReaderInputStream.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>