blob: 44acefea784b55b12227ae37defffe262c7db1f5 [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-google-internal) on Mon Jan 04 20:47:59 PST 2010 -->
<TITLE>
CharStreams (Guava Libraries 2010.01.04)
</TITLE>
<META NAME="date" CONTENT="2010-01-04">
<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="CharStreams (Guava Libraries 2010.01.04)";
}
}
</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/CharStreams.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="../../../../com/google/common/io/ByteStreams.html" title="class in com.google.common.io"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../com/google/common/io/Closeables.html" title="class in com.google.common.io"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?com/google/common/io/CharStreams.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="CharStreams.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;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&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">
com.google.common.io</FONT>
<BR>
Class CharStreams</H2>
<PRE>
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.google.common.io.CharStreams</B>
</PRE>
<HR>
<DL>
<DT><PRE>public final class <B>CharStreams</B><DT>extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL>
</PRE>
<P>
Provides utility methods for working with character streams.
<p>All method parameters must be non-null unless documented otherwise.
<p>Some of the methods in this class take arguments with a generic type of
<code>Readable &amp; Closeable</code>. A <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io"><CODE>Reader</CODE></A> implements both of
those interfaces. Similarly for <code>Appendable &amp; Closeable</code> and
<A HREF="http://java.sun.com/javase/6/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io"><CODE>Writer</CODE></A>.
<P>
<P>
<DL>
<DT><B>Since:</B></DT>
<DD>2009.09.15 <b>tentative</b></DD>
<DT><B>Author:</B></DT>
<DD>Chris Nokleberg, Bin Zhu</DD>
</DL>
<HR>
<P>
<!-- ========== 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>static&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/io/CharStreams.html#asWriter(java.lang.Appendable)">asWriter</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang">Appendable</A>&nbsp;target)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a Writer that sends all output to the given <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang"><CODE>Appendable</CODE></A>
target.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;R extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Readable.html?is-external=true" title="class or interface in java.lang">Readable</A> & <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</A>&gt;
<BR>
long</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/io/CharStreams.html#copy(com.google.common.io.InputSupplier, java.lang.Appendable)">copy</A></B>(<A HREF="../../../../com/google/common/io/InputSupplier.html" title="interface in com.google.common.io">InputSupplier</A>&lt;R&gt;&nbsp;from,
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang">Appendable</A>&nbsp;to)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Opens a <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Readable.html?is-external=true" title="class or interface in java.lang"><CODE>Readable</CODE></A> object from the supplier, copies all characters
to the <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang"><CODE>Appendable</CODE></A> object, and closes the input.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;R extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Readable.html?is-external=true" title="class or interface in java.lang">Readable</A> & <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</A>,W extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang">Appendable</A> & <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</A>&gt;
<BR>
long</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/io/CharStreams.html#copy(com.google.common.io.InputSupplier, com.google.common.io.OutputSupplier)">copy</A></B>(<A HREF="../../../../com/google/common/io/InputSupplier.html" title="interface in com.google.common.io">InputSupplier</A>&lt;R&gt;&nbsp;from,
<A HREF="../../../../com/google/common/io/OutputSupplier.html" title="interface in com.google.common.io">OutputSupplier</A>&lt;W&gt;&nbsp;to)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Opens <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Readable.html?is-external=true" title="class or interface in java.lang"><CODE>Readable</CODE></A> and <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang"><CODE>Appendable</CODE></A> objects from the
given factories, copies all characters between the two, and closes
them.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/io/CharStreams.html#copy(java.lang.Readable, java.lang.Appendable)">copy</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Readable.html?is-external=true" title="class or interface in java.lang">Readable</A>&nbsp;from,
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang">Appendable</A>&nbsp;to)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Copies all characters between the <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Readable.html?is-external=true" title="class or interface in java.lang"><CODE>Readable</CODE></A> and <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang"><CODE>Appendable</CODE></A>
objects.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../com/google/common/io/InputSupplier.html" title="interface in com.google.common.io">InputSupplier</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/io/CharStreams.html#join(com.google.common.io.InputSupplier...)">join</A></B>(<A HREF="../../../../com/google/common/io/InputSupplier.html" title="interface in com.google.common.io">InputSupplier</A>&lt;? extends <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</A>&gt;...&nbsp;suppliers)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Varargs form of <A HREF="../../../../com/google/common/io/CharStreams.html#join(java.lang.Iterable)"><CODE>join(Iterable)</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../com/google/common/io/InputSupplier.html" title="interface in com.google.common.io">InputSupplier</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/io/CharStreams.html#join(java.lang.Iterable)">join</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</A>&lt;? extends <A HREF="../../../../com/google/common/io/InputSupplier.html" title="interface in com.google.common.io">InputSupplier</A>&lt;? extends <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</A>&gt;&gt;&nbsp;suppliers)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Joins multiple <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io"><CODE>Reader</CODE></A> suppliers into a single supplier.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../com/google/common/io/InputSupplier.html" title="interface in com.google.common.io">InputSupplier</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/io/InputStreamReader.html?is-external=true" title="class or interface in java.io">InputStreamReader</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/io/CharStreams.html#newReaderSupplier(com.google.common.io.InputSupplier, java.nio.charset.Charset)">newReaderSupplier</A></B>(<A HREF="../../../../com/google/common/io/InputSupplier.html" title="interface in com.google.common.io">InputSupplier</A>&lt;? extends <A HREF="http://java.sun.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A>&gt;&nbsp;in,
<A HREF="http://java.sun.com/javase/6/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</A>&nbsp;charset)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a factory that will supply instances of <A HREF="http://java.sun.com/javase/6/docs/api/java/io/InputStreamReader.html?is-external=true" title="class or interface in java.io"><CODE>InputStreamReader</CODE></A>,
using the given <A HREF="http://java.sun.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io"><CODE>InputStream</CODE></A> factory and character set.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../com/google/common/io/InputSupplier.html" title="interface in com.google.common.io">InputSupplier</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/io/StringReader.html?is-external=true" title="class or interface in java.io">StringReader</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/io/CharStreams.html#newReaderSupplier(java.lang.String)">newReaderSupplier</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a factory that will supply instances of <A HREF="http://java.sun.com/javase/6/docs/api/java/io/StringReader.html?is-external=true" title="class or interface in java.io"><CODE>StringReader</CODE></A> that
read a string value.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../com/google/common/io/OutputSupplier.html" title="interface in com.google.common.io">OutputSupplier</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/io/OutputStreamWriter.html?is-external=true" title="class or interface in java.io">OutputStreamWriter</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/io/CharStreams.html#newWriterSupplier(com.google.common.io.OutputSupplier, java.nio.charset.Charset)">newWriterSupplier</A></B>(<A HREF="../../../../com/google/common/io/OutputSupplier.html" title="interface in com.google.common.io">OutputSupplier</A>&lt;? extends <A HREF="http://java.sun.com/javase/6/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A>&gt;&nbsp;out,
<A HREF="http://java.sun.com/javase/6/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</A>&nbsp;charset)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a factory that will supply instances of <A HREF="http://java.sun.com/javase/6/docs/api/java/io/OutputStreamWriter.html?is-external=true" title="class or interface in java.io"><CODE>OutputStreamWriter</CODE></A>,
using the given <A HREF="http://java.sun.com/javase/6/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io"><CODE>OutputStream</CODE></A> factory and character set.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;R extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Readable.html?is-external=true" title="class or interface in java.lang">Readable</A> & <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</A>&gt;
<BR>
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/io/CharStreams.html#readFirstLine(com.google.common.io.InputSupplier)">readFirstLine</A></B>(<A HREF="../../../../com/google/common/io/InputSupplier.html" title="interface in com.google.common.io">InputSupplier</A>&lt;R&gt;&nbsp;supplier)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads the first line from a <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Readable.html?is-external=true" title="class or interface in java.lang"><CODE>Readable</CODE></A> & <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io"><CODE>Closeable</CODE></A> object
supplied by a factory.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;R extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Readable.html?is-external=true" title="class or interface in java.lang">Readable</A> & <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</A>&gt;
<BR>
<A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&gt;</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/io/CharStreams.html#readLines(com.google.common.io.InputSupplier)">readLines</A></B>(<A HREF="../../../../com/google/common/io/InputSupplier.html" title="interface in com.google.common.io">InputSupplier</A>&lt;R&gt;&nbsp;supplier)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads all of the lines from a <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Readable.html?is-external=true" title="class or interface in java.lang"><CODE>Readable</CODE></A> & <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io"><CODE>Closeable</CODE></A> object
supplied by a factory.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;R extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Readable.html?is-external=true" title="class or interface in java.lang">Readable</A> & <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</A>,T&gt;
<BR>
T</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/io/CharStreams.html#readLines(com.google.common.io.InputSupplier, com.google.common.io.LineProcessor)">readLines</A></B>(<A HREF="../../../../com/google/common/io/InputSupplier.html" title="interface in com.google.common.io">InputSupplier</A>&lt;R&gt;&nbsp;supplier,
<A HREF="../../../../com/google/common/io/LineProcessor.html" title="interface in com.google.common.io">LineProcessor</A>&lt;T&gt;&nbsp;callback)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Streams lines from a <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Readable.html?is-external=true" title="class or interface in java.lang"><CODE>Readable</CODE></A> and <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io"><CODE>Closeable</CODE></A> object
supplied by a factory, stopping when our callback returns false, or we
have read all of the lines.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/io/CharStreams.html#readLines(java.lang.Readable)">readLines</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Readable.html?is-external=true" title="class or interface in java.lang">Readable</A>&nbsp;r)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads all of the lines from a <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Readable.html?is-external=true" title="class or interface in java.lang"><CODE>Readable</CODE></A> object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/io/CharStreams.html#skipFully(java.io.Reader, long)">skipFully</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</A>&nbsp;reader,
long&nbsp;n)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Discards <code>n</code> characters of data from the reader.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;R extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Readable.html?is-external=true" title="class or interface in java.lang">Readable</A> & <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</A>&gt;
<BR>
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/io/CharStreams.html#toString(com.google.common.io.InputSupplier)">toString</A></B>(<A HREF="../../../../com/google/common/io/InputSupplier.html" title="interface in com.google.common.io">InputSupplier</A>&lt;R&gt;&nbsp;supplier)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the characters from a <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Readable.html?is-external=true" title="class or interface in java.lang"><CODE>Readable</CODE></A> & <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io"><CODE>Closeable</CODE></A> object
supplied by a factory as a <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang"><CODE>String</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/io/CharStreams.html#toString(java.lang.Readable)">toString</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Readable.html?is-external=true" title="class or interface in java.lang">Readable</A>&nbsp;r)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads all characters from a <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Readable.html?is-external=true" title="class or interface in java.lang"><CODE>Readable</CODE></A> object into a <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang"><CODE>String</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;W extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang">Appendable</A> & <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</A>&gt;
<BR>
void</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/io/CharStreams.html#write(java.lang.CharSequence, com.google.common.io.OutputSupplier)">write</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</A>&nbsp;from,
<A HREF="../../../../com/google/common/io/OutputSupplier.html" title="interface in com.google.common.io">OutputSupplier</A>&lt;W&gt;&nbsp;to)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes a character sequence (such as a string) to an appendable
object from the given supplier.</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.<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://java.sun.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://java.sun.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://java.sun.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://java.sun.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://java.sun.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://java.sun.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://java.sun.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://java.sun.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://java.sun.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://java.sun.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://java.sun.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>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ 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="newReaderSupplier(java.lang.String)"><!-- --></A><H3>
newReaderSupplier</H3>
<PRE>
public static <A HREF="../../../../com/google/common/io/InputSupplier.html" title="interface in com.google.common.io">InputSupplier</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/io/StringReader.html?is-external=true" title="class or interface in java.io">StringReader</A>&gt; <B>newReaderSupplier</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;value)</PRE>
<DL>
<DD>Returns a factory that will supply instances of <A HREF="http://java.sun.com/javase/6/docs/api/java/io/StringReader.html?is-external=true" title="class or interface in java.io"><CODE>StringReader</CODE></A> that
read a string value.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the string to read
<DT><B>Returns:</B><DD>the factory</DL>
</DD>
</DL>
<HR>
<A NAME="newReaderSupplier(com.google.common.io.InputSupplier, java.nio.charset.Charset)"><!-- --></A><H3>
newReaderSupplier</H3>
<PRE>
public static <A HREF="../../../../com/google/common/io/InputSupplier.html" title="interface in com.google.common.io">InputSupplier</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/io/InputStreamReader.html?is-external=true" title="class or interface in java.io">InputStreamReader</A>&gt; <B>newReaderSupplier</B>(<A HREF="../../../../com/google/common/io/InputSupplier.html" title="interface in com.google.common.io">InputSupplier</A>&lt;? extends <A HREF="http://java.sun.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A>&gt;&nbsp;in,
<A HREF="http://java.sun.com/javase/6/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</A>&nbsp;charset)</PRE>
<DL>
<DD>Returns a factory that will supply instances of <A HREF="http://java.sun.com/javase/6/docs/api/java/io/InputStreamReader.html?is-external=true" title="class or interface in java.io"><CODE>InputStreamReader</CODE></A>,
using the given <A HREF="http://java.sun.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io"><CODE>InputStream</CODE></A> factory and character set.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>in</CODE> - the factory that will be used to open input streams<DD><CODE>charset</CODE> - the character set used to decode the input stream
<DT><B>Returns:</B><DD>the factory</DL>
</DD>
</DL>
<HR>
<A NAME="newWriterSupplier(com.google.common.io.OutputSupplier, java.nio.charset.Charset)"><!-- --></A><H3>
newWriterSupplier</H3>
<PRE>
public static <A HREF="../../../../com/google/common/io/OutputSupplier.html" title="interface in com.google.common.io">OutputSupplier</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/io/OutputStreamWriter.html?is-external=true" title="class or interface in java.io">OutputStreamWriter</A>&gt; <B>newWriterSupplier</B>(<A HREF="../../../../com/google/common/io/OutputSupplier.html" title="interface in com.google.common.io">OutputSupplier</A>&lt;? extends <A HREF="http://java.sun.com/javase/6/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A>&gt;&nbsp;out,
<A HREF="http://java.sun.com/javase/6/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</A>&nbsp;charset)</PRE>
<DL>
<DD>Returns a factory that will supply instances of <A HREF="http://java.sun.com/javase/6/docs/api/java/io/OutputStreamWriter.html?is-external=true" title="class or interface in java.io"><CODE>OutputStreamWriter</CODE></A>,
using the given <A HREF="http://java.sun.com/javase/6/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io"><CODE>OutputStream</CODE></A> factory and character set.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>out</CODE> - the factory that will be used to open output streams<DD><CODE>charset</CODE> - the character set used to encode the output stream
<DT><B>Returns:</B><DD>the factory</DL>
</DD>
</DL>
<HR>
<A NAME="write(java.lang.CharSequence, com.google.common.io.OutputSupplier)"><!-- --></A><H3>
write</H3>
<PRE>
public static &lt;W extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang">Appendable</A> & <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</A>&gt; void <B>write</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</A>&nbsp;from,
<A HREF="../../../../com/google/common/io/OutputSupplier.html" title="interface in com.google.common.io">OutputSupplier</A>&lt;W&gt;&nbsp;to)
throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Writes a character sequence (such as a string) to an appendable
object from the given supplier.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>from</CODE> - the character sequence to write<DD><CODE>to</CODE> - the output supplier
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - if an I/O error occurs</DL>
</DD>
</DL>
<HR>
<A NAME="copy(com.google.common.io.InputSupplier, com.google.common.io.OutputSupplier)"><!-- --></A><H3>
copy</H3>
<PRE>
public static &lt;R extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Readable.html?is-external=true" title="class or interface in java.lang">Readable</A> & <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</A>,W extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang">Appendable</A> & <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</A>&gt; long <B>copy</B>(<A HREF="../../../../com/google/common/io/InputSupplier.html" title="interface in com.google.common.io">InputSupplier</A>&lt;R&gt;&nbsp;from,
<A HREF="../../../../com/google/common/io/OutputSupplier.html" title="interface in com.google.common.io">OutputSupplier</A>&lt;W&gt;&nbsp;to)
throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Opens <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Readable.html?is-external=true" title="class or interface in java.lang"><CODE>Readable</CODE></A> and <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang"><CODE>Appendable</CODE></A> objects from the
given factories, copies all characters between the two, and closes
them.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>from</CODE> - the input factory<DD><CODE>to</CODE> - the output factory
<DT><B>Returns:</B><DD>the number of characters copied
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - if an I/O error occurs</DL>
</DD>
</DL>
<HR>
<A NAME="copy(com.google.common.io.InputSupplier, java.lang.Appendable)"><!-- --></A><H3>
copy</H3>
<PRE>
public static &lt;R extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Readable.html?is-external=true" title="class or interface in java.lang">Readable</A> & <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</A>&gt; long <B>copy</B>(<A HREF="../../../../com/google/common/io/InputSupplier.html" title="interface in com.google.common.io">InputSupplier</A>&lt;R&gt;&nbsp;from,
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang">Appendable</A>&nbsp;to)
throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Opens a <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Readable.html?is-external=true" title="class or interface in java.lang"><CODE>Readable</CODE></A> object from the supplier, copies all characters
to the <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang"><CODE>Appendable</CODE></A> object, and closes the input. Does not close
or flush the output.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>from</CODE> - the input factory<DD><CODE>to</CODE> - the object to write to
<DT><B>Returns:</B><DD>the number of characters copied
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - if an I/O error occurs</DL>
</DD>
</DL>
<HR>
<A NAME="copy(java.lang.Readable, java.lang.Appendable)"><!-- --></A><H3>
copy</H3>
<PRE>
public static long <B>copy</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Readable.html?is-external=true" title="class or interface in java.lang">Readable</A>&nbsp;from,
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang">Appendable</A>&nbsp;to)
throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Copies all characters between the <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Readable.html?is-external=true" title="class or interface in java.lang"><CODE>Readable</CODE></A> and <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang"><CODE>Appendable</CODE></A>
objects. Does not close or flush either object.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>from</CODE> - the object to read from<DD><CODE>to</CODE> - the object to write to
<DT><B>Returns:</B><DD>the number of characters copied
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - if an I/O error occurs</DL>
</DD>
</DL>
<HR>
<A NAME="toString(java.lang.Readable)"><!-- --></A><H3>
toString</H3>
<PRE>
public static <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>toString</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Readable.html?is-external=true" title="class or interface in java.lang">Readable</A>&nbsp;r)
throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Reads all characters from a <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Readable.html?is-external=true" title="class or interface in java.lang"><CODE>Readable</CODE></A> object into a <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang"><CODE>String</CODE></A>.
Does not close the <code>Readable</code>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>r</CODE> - the object to read from
<DT><B>Returns:</B><DD>a string containing all the characters
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - if an I/O error occurs</DL>
</DD>
</DL>
<HR>
<A NAME="toString(com.google.common.io.InputSupplier)"><!-- --></A><H3>
toString</H3>
<PRE>
public static &lt;R extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Readable.html?is-external=true" title="class or interface in java.lang">Readable</A> & <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</A>&gt; <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>toString</B>(<A HREF="../../../../com/google/common/io/InputSupplier.html" title="interface in com.google.common.io">InputSupplier</A>&lt;R&gt;&nbsp;supplier)
throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Returns the characters from a <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Readable.html?is-external=true" title="class or interface in java.lang"><CODE>Readable</CODE></A> & <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io"><CODE>Closeable</CODE></A> object
supplied by a factory as a <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang"><CODE>String</CODE></A>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>supplier</CODE> - the factory to read from
<DT><B>Returns:</B><DD>a string containing all the characters
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - if an I/O error occurs</DL>
</DD>
</DL>
<HR>
<A NAME="readFirstLine(com.google.common.io.InputSupplier)"><!-- --></A><H3>
readFirstLine</H3>
<PRE>
public static &lt;R extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Readable.html?is-external=true" title="class or interface in java.lang">Readable</A> & <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</A>&gt; <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>readFirstLine</B>(<A HREF="../../../../com/google/common/io/InputSupplier.html" title="interface in com.google.common.io">InputSupplier</A>&lt;R&gt;&nbsp;supplier)
throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Reads the first line from a <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Readable.html?is-external=true" title="class or interface in java.lang"><CODE>Readable</CODE></A> & <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io"><CODE>Closeable</CODE></A> object
supplied by a factory. The line does not include line-termination
characters, but does include other leading and trailing whitespace.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>supplier</CODE> - the factory to read from
<DT><B>Returns:</B><DD>the first line, or null if the reader is empty
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - if an I/O error occurs</DL>
</DD>
</DL>
<HR>
<A NAME="readLines(com.google.common.io.InputSupplier)"><!-- --></A><H3>
readLines</H3>
<PRE>
public static &lt;R extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Readable.html?is-external=true" title="class or interface in java.lang">Readable</A> & <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</A>&gt; <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&gt; <B>readLines</B>(<A HREF="../../../../com/google/common/io/InputSupplier.html" title="interface in com.google.common.io">InputSupplier</A>&lt;R&gt;&nbsp;supplier)
throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Reads all of the lines from a <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Readable.html?is-external=true" title="class or interface in java.lang"><CODE>Readable</CODE></A> & <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io"><CODE>Closeable</CODE></A> object
supplied by a factory. The lines do not include line-termination
characters, but do include other leading and trailing whitespace.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>supplier</CODE> - the factory to read from
<DT><B>Returns:</B><DD>a mutable <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util"><CODE>List</CODE></A> containing all the lines
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - if an I/O error occurs</DL>
</DD>
</DL>
<HR>
<A NAME="readLines(java.lang.Readable)"><!-- --></A><H3>
readLines</H3>
<PRE>
public static <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&gt; <B>readLines</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Readable.html?is-external=true" title="class or interface in java.lang">Readable</A>&nbsp;r)
throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Reads all of the lines from a <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Readable.html?is-external=true" title="class or interface in java.lang"><CODE>Readable</CODE></A> object. The lines do
not include line-termination characters, but do include other
leading and trailing whitespace.
<p>Does not close the <code>Readable</code>. If reading files or resources you
should use the <A HREF="../../../../com/google/common/io/Files.html#readLines(java.io.File, java.nio.charset.Charset)"><CODE>Files.readLines(java.io.File, java.nio.charset.Charset)</CODE></A> and <A HREF="../../../../com/google/common/io/Resources.html#readLines(java.net.URL, java.nio.charset.Charset, com.google.common.io.LineProcessor)"><CODE>Resources.readLines(java.net.URL, java.nio.charset.Charset, com.google.common.io.LineProcessor<T>)</CODE></A>
methods.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>r</CODE> - the object to read from
<DT><B>Returns:</B><DD>a mutable <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util"><CODE>List</CODE></A> containing all the lines
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - if an I/O error occurs</DL>
</DD>
</DL>
<HR>
<A NAME="readLines(com.google.common.io.InputSupplier, com.google.common.io.LineProcessor)"><!-- --></A><H3>
readLines</H3>
<PRE>
public static &lt;R extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Readable.html?is-external=true" title="class or interface in java.lang">Readable</A> & <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</A>,T&gt; T <B>readLines</B>(<A HREF="../../../../com/google/common/io/InputSupplier.html" title="interface in com.google.common.io">InputSupplier</A>&lt;R&gt;&nbsp;supplier,
<A HREF="../../../../com/google/common/io/LineProcessor.html" title="interface in com.google.common.io">LineProcessor</A>&lt;T&gt;&nbsp;callback)
throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Streams lines from a <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Readable.html?is-external=true" title="class or interface in java.lang"><CODE>Readable</CODE></A> and <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io"><CODE>Closeable</CODE></A> object
supplied by a factory, stopping when our callback returns false, or we
have read all of the lines.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>supplier</CODE> - the factory to read from<DD><CODE>callback</CODE> - the LineProcessor to use to handle the lines
<DT><B>Returns:</B><DD>the output of processing the lines
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - if an I/O error occurs</DL>
</DD>
</DL>
<HR>
<A NAME="join(java.lang.Iterable)"><!-- --></A><H3>
join</H3>
<PRE>
public static <A HREF="../../../../com/google/common/io/InputSupplier.html" title="interface in com.google.common.io">InputSupplier</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</A>&gt; <B>join</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</A>&lt;? extends <A HREF="../../../../com/google/common/io/InputSupplier.html" title="interface in com.google.common.io">InputSupplier</A>&lt;? extends <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</A>&gt;&gt;&nbsp;suppliers)</PRE>
<DL>
<DD>Joins multiple <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io"><CODE>Reader</CODE></A> suppliers into a single supplier.
Reader returned from the supplier will contain the concatenated data
from the readers of the underlying suppliers.
<p>Reading from the joined reader will throw a <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang"><CODE>NullPointerException</CODE></A>
if any of the suppliers are null or return null.
<p>Only one underlying reader will be open at a time. Closing the
joined reader will close the open underlying reader.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>suppliers</CODE> - the suppliers to concatenate
<DT><B>Returns:</B><DD>a supplier that will return a reader containing the concatenated
data</DL>
</DD>
</DL>
<HR>
<A NAME="join(com.google.common.io.InputSupplier...)"><!-- --></A><H3>
join</H3>
<PRE>
public static <A HREF="../../../../com/google/common/io/InputSupplier.html" title="interface in com.google.common.io">InputSupplier</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</A>&gt; <B>join</B>(<A HREF="../../../../com/google/common/io/InputSupplier.html" title="interface in com.google.common.io">InputSupplier</A>&lt;? extends <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</A>&gt;...&nbsp;suppliers)</PRE>
<DL>
<DD>Varargs form of <A HREF="../../../../com/google/common/io/CharStreams.html#join(java.lang.Iterable)"><CODE>join(Iterable)</CODE></A>.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="skipFully(java.io.Reader, long)"><!-- --></A><H3>
skipFully</H3>
<PRE>
public static void <B>skipFully</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</A>&nbsp;reader,
long&nbsp;n)
throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Discards <code>n</code> characters of data from the reader. This method
will block until the full amount has been skipped. Does not close the
reader.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>reader</CODE> - the reader to read from<DD><CODE>n</CODE> - the number of characters to skip
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/EOFException.html?is-external=true" title="class or interface in java.io">EOFException</A></CODE> - if this stream reaches the end before skipping all
the bytes
<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - if an I/O error occurs</DL>
</DD>
</DL>
<HR>
<A NAME="asWriter(java.lang.Appendable)"><!-- --></A><H3>
asWriter</H3>
<PRE>
public static <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</A> <B>asWriter</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang">Appendable</A>&nbsp;target)</PRE>
<DL>
<DD>Returns a Writer that sends all output to the given <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang"><CODE>Appendable</CODE></A>
target. Closing the writer will close the target if it is <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io"><CODE>Closeable</CODE></A>, and flushing the writer will flush the target if it is <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Flushable.html?is-external=true" title="class or interface in java.io"><CODE>Flushable</CODE></A>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>target</CODE> - the object to which output will be sent
<DT><B>Returns:</B><DD>a new Writer object, unless target is a Writer, in which case the
target is returned</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/CharStreams.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="../../../../com/google/common/io/ByteStreams.html" title="class in com.google.common.io"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../com/google/common/io/Closeables.html" title="class in com.google.common.io"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?com/google/common/io/CharStreams.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="CharStreams.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;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&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>