FAISP/libs/commons-io-2.11.0/docs/org/apache/commons/io/IOUtils.html

5753 lines
396 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>IOUtils (Apache Commons IO 2.11.0 API)</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="IOUtils (Apache Commons IO 2.11.0 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9,"i16":9,"i17":9,"i18":9,"i19":9,"i20":9,"i21":9,"i22":9,"i23":9,"i24":9,"i25":9,"i26":9,"i27":9,"i28":9,"i29":9,"i30":41,"i31":9,"i32":9,"i33":9,"i34":9,"i35":41,"i36":9,"i37":9,"i38":9,"i39":9,"i40":9,"i41":9,"i42":9,"i43":9,"i44":9,"i45":9,"i46":9,"i47":9,"i48":9,"i49":9,"i50":9,"i51":9,"i52":9,"i53":9,"i54":9,"i55":9,"i56":9,"i57":9,"i58":9,"i59":9,"i60":9,"i61":9,"i62":9,"i63":9,"i64":9,"i65":9,"i66":9,"i67":41,"i68":9,"i69":9,"i70":9,"i71":9,"i72":9,"i73":9,"i74":9,"i75":9,"i76":9,"i77":9,"i78":9,"i79":9,"i80":9,"i81":9,"i82":9,"i83":9,"i84":9,"i85":9,"i86":9,"i87":9,"i88":9,"i89":9,"i90":41,"i91":9,"i92":9,"i93":41,"i94":9,"i95":9,"i96":9,"i97":41,"i98":9,"i99":9,"i100":9,"i101":41,"i102":9,"i103":9,"i104":41,"i105":9,"i106":9,"i107":41,"i108":9,"i109":41,"i110":9,"i111":9,"i112":9,"i113":41,"i114":9,"i115":9,"i116":41,"i117":9,"i118":9,"i119":9,"i120":41,"i121":9,"i122":9,"i123":41,"i124":9,"i125":9,"i126":9,"i127":41,"i128":9,"i129":9,"i130":9,"i131":41,"i132":41,"i133":41,"i134":41,"i135":9,"i136":9,"i137":9,"i138":9,"i139":9,"i140":41,"i141":9,"i142":9,"i143":9,"i144":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/IOUtils.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/commons/io/IOIndexedException.html" title="class in org.apache.commons.io"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/commons/io/LineIterator.html" title="class in org.apache.commons.io"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/commons/io/IOUtils.html" target="_top">Frames</a></li>
<li><a href="IOUtils.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.commons.io</div>
<h2 title="Class IOUtils" class="title">Class IOUtils</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.commons.io.IOUtils</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="typeNameLabel">IOUtils</span>
extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block">General IO stream manipulation utilities.
<p>
This class provides static utility methods for input/output operations.
<ul>
<li><b>[Deprecated]</b> closeQuietly - these methods close a stream ignoring nulls and exceptions
<li>toXxx/read - these methods read data from a stream
<li>write - these methods write data to a stream
<li>copy - these methods copy all the data from one stream to another
<li>contentEquals - these methods compare the content of two streams
</ul>
<p>
The byte-to-char methods and char-to-byte methods involve a conversion step.
Two methods are provided in each case, one that uses the platform default
encoding and the other which allows you to specify an encoding. You are
encouraged to always specify an encoding because relying on the platform
default can lead to unexpected results, for example when moving from
development to production.
<p>
All the methods in this class that read a stream are buffered internally.
This means that there is no cause to use a <code>BufferedInputStream</code>
or <code>BufferedReader</code>. The default buffer size of 4K has been shown
to be efficient in tests.
<p>
The various copy methods all delegate the actual copying to one of the following methods:
<ul>
<li><a href="../../../../org/apache/commons/io/IOUtils.html#copyLarge-java.io.InputStream-java.io.OutputStream-byte:A-"><code>copyLarge(InputStream, OutputStream, byte[])</code></a></li>
<li><a href="../../../../org/apache/commons/io/IOUtils.html#copyLarge-java.io.InputStream-java.io.OutputStream-long-long-byte:A-"><code>copyLarge(InputStream, OutputStream, long, long, byte[])</code></a></li>
<li><a href="../../../../org/apache/commons/io/IOUtils.html#copyLarge-java.io.Reader-java.io.Writer-char:A-"><code>copyLarge(Reader, Writer, char[])</code></a></li>
<li><a href="../../../../org/apache/commons/io/IOUtils.html#copyLarge-java.io.Reader-java.io.Writer-long-long-char:A-"><code>copyLarge(Reader, Writer, long, long, char[])</code></a></li>
</ul>
For example, <a href="../../../../org/apache/commons/io/IOUtils.html#copy-java.io.InputStream-java.io.OutputStream-"><code>copy(InputStream, OutputStream)</code></a> calls <a href="../../../../org/apache/commons/io/IOUtils.html#copyLarge-java.io.InputStream-java.io.OutputStream-"><code>copyLarge(InputStream, OutputStream)</code></a>
which calls <a href="../../../../org/apache/commons/io/IOUtils.html#copy-java.io.InputStream-java.io.OutputStream-int-"><code>copy(InputStream, OutputStream, int)</code></a> which creates the buffer and calls
<a href="../../../../org/apache/commons/io/IOUtils.html#copyLarge-java.io.InputStream-java.io.OutputStream-byte:A-"><code>copyLarge(InputStream, OutputStream, byte[])</code></a>.
<p>
Applications can re-use buffers by using the underlying methods directly.
This may improve performance for applications that need to do a lot of copying.
<p>
Wherever possible, the methods in this class do <em>not</em> flush or close
the stream. This is to avoid making non-portable assumptions about the
streams' origin and further use. Thus the caller is still responsible for
closing streams after use.
<p>
Origin of code: Excalibur.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#CR">CR</a></span></code>
<div class="block">CR char.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#DEFAULT_BUFFER_SIZE">DEFAULT_BUFFER_SIZE</a></span></code>
<div class="block">The default buffer size (8192) to use in copy methods.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static char</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#DIR_SEPARATOR">DIR_SEPARATOR</a></span></code>
<div class="block">The system directory separator character.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static char</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#DIR_SEPARATOR_UNIX">DIR_SEPARATOR_UNIX</a></span></code>
<div class="block">The Unix directory separator character.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static char</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#DIR_SEPARATOR_WINDOWS">DIR_SEPARATOR_WINDOWS</a></span></code>
<div class="block">The Windows directory separator character.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#EMPTY_BYTE_ARRAY">EMPTY_BYTE_ARRAY</a></span></code>
<div class="block">A singleton empty byte array.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#EOF">EOF</a></span></code>
<div class="block">Represents the end-of-file (or stream).</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#LF">LF</a></span></code>
<div class="block">LF char.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#LINE_SEPARATOR">LINE_SEPARATOR</a></span></code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">Use <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/System.html?is-external=true#lineSeparator--" title="class or interface in java.lang"><code>System.lineSeparator()</code></a>.</span></div>
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#LINE_SEPARATOR_UNIX">LINE_SEPARATOR_UNIX</a></span></code>
<div class="block">The Unix line separator string.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#LINE_SEPARATOR_WINDOWS">LINE_SEPARATOR_WINDOWS</a></span></code>
<div class="block">The Windows line separator string.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#IOUtils--">IOUtils</a></span>()</code>
<div class="block">Instances should NOT be constructed in standard programming.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedInputStream.html?is-external=true" title="class or interface in java.io">BufferedInputStream</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#buffer-java.io.InputStream-">buffer</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;inputStream)</code>
<div class="block">Returns the given InputStream if it is already a <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedInputStream.html?is-external=true" title="class or interface in java.io"><code>BufferedInputStream</code></a>, otherwise creates a
BufferedInputStream from the given InputStream.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedInputStream.html?is-external=true" title="class or interface in java.io">BufferedInputStream</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#buffer-java.io.InputStream-int-">buffer</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;inputStream,
int&nbsp;size)</code>
<div class="block">Returns the given InputStream if it is already a <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedInputStream.html?is-external=true" title="class or interface in java.io"><code>BufferedInputStream</code></a>, otherwise creates a
BufferedInputStream from the given InputStream.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedOutputStream.html?is-external=true" title="class or interface in java.io">BufferedOutputStream</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#buffer-java.io.OutputStream-">buffer</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;outputStream)</code>
<div class="block">Returns the given OutputStream if it is already a <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedOutputStream.html?is-external=true" title="class or interface in java.io"><code>BufferedOutputStream</code></a>, otherwise creates a
BufferedOutputStream from the given OutputStream.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedOutputStream.html?is-external=true" title="class or interface in java.io">BufferedOutputStream</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#buffer-java.io.OutputStream-int-">buffer</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;outputStream,
int&nbsp;size)</code>
<div class="block">Returns the given OutputStream if it is already a <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedOutputStream.html?is-external=true" title="class or interface in java.io"><code>BufferedOutputStream</code></a>, otherwise creates a
BufferedOutputStream from the given OutputStream.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io">BufferedReader</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#buffer-java.io.Reader-">buffer</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader)</code>
<div class="block">Returns the given reader if it is already a <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io"><code>BufferedReader</code></a>, otherwise creates a BufferedReader from
the given reader.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io">BufferedReader</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#buffer-java.io.Reader-int-">buffer</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
int&nbsp;size)</code>
<div class="block">Returns the given reader if it is already a <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io"><code>BufferedReader</code></a>, otherwise creates a BufferedReader from the
given reader.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedWriter.html?is-external=true" title="class or interface in java.io">BufferedWriter</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#buffer-java.io.Writer-">buffer</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer)</code>
<div class="block">Returns the given Writer if it is already a <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedWriter.html?is-external=true" title="class or interface in java.io"><code>BufferedWriter</code></a>, otherwise creates a BufferedWriter from the
given Writer.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedWriter.html?is-external=true" title="class or interface in java.io">BufferedWriter</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#buffer-java.io.Writer-int-">buffer</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer,
int&nbsp;size)</code>
<div class="block">Returns the given Writer if it is already a <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedWriter.html?is-external=true" title="class or interface in java.io"><code>BufferedWriter</code></a>, otherwise creates a BufferedWriter from the
given Writer.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#byteArray--">byteArray</a></span>()</code>
<div class="block">Returns a new byte array of size <a href="../../../../org/apache/commons/io/IOUtils.html#DEFAULT_BUFFER_SIZE"><code>DEFAULT_BUFFER_SIZE</code></a>.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#byteArray-int-">byteArray</a></span>(int&nbsp;size)</code>
<div class="block">Returns a new byte array of the given size.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#close-java.io.Closeable...-">close</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>...&nbsp;closeables)</code>
<div class="block">Closes the given <a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io"><code>Closeable</code></a> as a null-safe operation.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#close-java.io.Closeable-">close</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>&nbsp;closeable)</code>
<div class="block">Closes the given <a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io"><code>Closeable</code></a> as a null-safe operation.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#close-java.io.Closeable-org.apache.commons.io.function.IOConsumer-">close</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>&nbsp;closeable,
<a href="../../../../org/apache/commons/io/function/IOConsumer.html" title="interface in org.apache.commons.io.function">IOConsumer</a>&lt;<a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>&gt;&nbsp;consumer)</code>
<div class="block">Closes the given <a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io"><code>Closeable</code></a> as a null-safe operation.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#close-java.net.URLConnection-">close</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/net/URLConnection.html?is-external=true" title="class or interface in java.net">URLConnection</a>&nbsp;conn)</code>
<div class="block">Closes a URLConnection.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#closeQuietly-java.io.Closeable...-">closeQuietly</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>...&nbsp;closeables)</code>
<div class="block">Closes a <code>Closeable</code> unconditionally.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#closeQuietly-java.io.Closeable-">closeQuietly</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>&nbsp;closeable)</code>
<div class="block">Closes a <code>Closeable</code> unconditionally.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#closeQuietly-java.io.Closeable-java.util.function.Consumer-">closeQuietly</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>&nbsp;closeable,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html?is-external=true" title="class or interface in java.util.function">Consumer</a>&lt;<a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>&gt;&nbsp;consumer)</code>
<div class="block">Closes the given <a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io"><code>Closeable</code></a> as a null-safe operation while consuming IOException by the given <code>consumer</code>.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#closeQuietly-java.io.InputStream-">closeQuietly</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input)</code>
<div class="block">Closes an <code>InputStream</code> unconditionally.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#closeQuietly-java.io.OutputStream-">closeQuietly</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)</code>
<div class="block">Closes an <code>OutputStream</code> unconditionally.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#closeQuietly-java.io.Reader-">closeQuietly</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader)</code>
<div class="block">Closes an <code>Reader</code> unconditionally.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#closeQuietly-java.nio.channels.Selector-">closeQuietly</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/channels/Selector.html?is-external=true" title="class or interface in java.nio.channels">Selector</a>&nbsp;selector)</code>
<div class="block">Closes a <code>Selector</code> unconditionally.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#closeQuietly-java.net.ServerSocket-">closeQuietly</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/net/ServerSocket.html?is-external=true" title="class or interface in java.net">ServerSocket</a>&nbsp;serverSocket)</code>
<div class="block">Closes a <code>ServerSocket</code> unconditionally.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#closeQuietly-java.net.Socket-">closeQuietly</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/net/Socket.html?is-external=true" title="class or interface in java.net">Socket</a>&nbsp;socket)</code>
<div class="block">Closes a <code>Socket</code> unconditionally.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#closeQuietly-java.io.Writer-">closeQuietly</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer)</code>
<div class="block">Closes an <code>Writer</code> unconditionally.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#consume-java.io.InputStream-">consume</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input)</code>
<div class="block">Consumes bytes from a <code>InputStream</code> and ignores them.</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#contentEquals-java.io.InputStream-java.io.InputStream-">contentEquals</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input1,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input2)</code>
<div class="block">Compares the contents of two Streams to determine if they are equal or
not.</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#contentEquals-java.io.Reader-java.io.Reader-">contentEquals</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input1,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input2)</code>
<div class="block">Compares the contents of two Readers to determine if they are equal or not.</div>
</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#contentEqualsIgnoreEOL-java.io.Reader-java.io.Reader-">contentEqualsIgnoreEOL</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader1,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader2)</code>
<div class="block">Compares the contents of two Readers to determine if they are equal or
not, ignoring EOL characters.</div>
</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#copy-java.io.InputStream-java.io.OutputStream-">copy</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;inputStream,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;outputStream)</code>
<div class="block">Copies bytes from an <code>InputStream</code> to an <code>OutputStream</code>.</div>
</td>
</tr>
<tr id="i29" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#copy-java.io.InputStream-java.io.OutputStream-int-">copy</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;inputStream,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;outputStream,
int&nbsp;bufferSize)</code>
<div class="block">Copies bytes from an <code>InputStream</code> to an <code>OutputStream</code> using an internal buffer of the
given size.</div>
</td>
</tr>
<tr id="i30" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#copy-java.io.InputStream-java.io.Writer-">copy</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#copy-java.io.InputStream-java.io.Writer-java.nio.charset.Charset-"><code>copy(InputStream, Writer, Charset)</code></a> instead</span></div>
</div>
</td>
</tr>
<tr id="i31" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#copy-java.io.InputStream-java.io.Writer-java.nio.charset.Charset-">copy</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;inputCharset)</code>
<div class="block">Copies bytes from an <code>InputStream</code> to chars on a
<code>Writer</code> using the specified character encoding.</div>
</td>
</tr>
<tr id="i32" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#copy-java.io.InputStream-java.io.Writer-java.lang.String-">copy</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;inputCharsetName)</code>
<div class="block">Copies bytes from an <code>InputStream</code> to chars on a
<code>Writer</code> using the specified character encoding.</div>
</td>
</tr>
<tr id="i33" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#copy-java.io.Reader-java.lang.Appendable-">copy</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang">Appendable</a>&nbsp;output)</code>
<div class="block">Copies chars from a <code>Reader</code> to a <code>Appendable</code>.</div>
</td>
</tr>
<tr id="i34" class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#copy-java.io.Reader-java.lang.Appendable-java.nio.CharBuffer-">copy</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang">Appendable</a>&nbsp;output,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/CharBuffer.html?is-external=true" title="class or interface in java.nio">CharBuffer</a>&nbsp;buffer)</code>
<div class="block">Copies chars from a <code>Reader</code> to an <code>Appendable</code>.</div>
</td>
</tr>
<tr id="i35" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#copy-java.io.Reader-java.io.OutputStream-">copy</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#copy-java.io.Reader-java.io.OutputStream-java.nio.charset.Charset-"><code>copy(Reader, OutputStream, Charset)</code></a> instead</span></div>
</div>
</td>
</tr>
<tr id="i36" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#copy-java.io.Reader-java.io.OutputStream-java.nio.charset.Charset-">copy</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;outputCharset)</code>
<div class="block">Copies chars from a <code>Reader</code> to bytes on an
<code>OutputStream</code> using the specified character encoding, and
calling flush.</div>
</td>
</tr>
<tr id="i37" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#copy-java.io.Reader-java.io.OutputStream-java.lang.String-">copy</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;outputCharsetName)</code>
<div class="block">Copies chars from a <code>Reader</code> to bytes on an
<code>OutputStream</code> using the specified character encoding, and
calling flush.</div>
</td>
</tr>
<tr id="i38" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#copy-java.io.Reader-java.io.Writer-">copy</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer)</code>
<div class="block">Copies chars from a <code>Reader</code> to a <code>Writer</code>.</div>
</td>
</tr>
<tr id="i39" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#copy-java.net.URL-java.io.File-">copy</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;url,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)</code>
<div class="block">Copies bytes from a <code>URL</code> to an <code>OutputStream</code>.</div>
</td>
</tr>
<tr id="i40" class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#copy-java.net.URL-java.io.OutputStream-">copy</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;url,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;outputStream)</code>
<div class="block">Copies bytes from a <code>URL</code> to an <code>OutputStream</code>.</div>
</td>
</tr>
<tr id="i41" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#copyLarge-java.io.InputStream-java.io.OutputStream-">copyLarge</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;inputStream,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;outputStream)</code>
<div class="block">Copies bytes from a large (over 2GB) <code>InputStream</code> to an
<code>OutputStream</code>.</div>
</td>
</tr>
<tr id="i42" class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#copyLarge-java.io.InputStream-java.io.OutputStream-byte:A-">copyLarge</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;inputStream,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;outputStream,
byte[]&nbsp;buffer)</code>
<div class="block">Copies bytes from a large (over 2GB) <code>InputStream</code> to an
<code>OutputStream</code>.</div>
</td>
</tr>
<tr id="i43" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#copyLarge-java.io.InputStream-java.io.OutputStream-long-long-">copyLarge</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
long&nbsp;inputOffset,
long&nbsp;length)</code>
<div class="block">Copies some or all bytes from a large (over 2GB) <code>InputStream</code> to an
<code>OutputStream</code>, optionally skipping input bytes.</div>
</td>
</tr>
<tr id="i44" class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#copyLarge-java.io.InputStream-java.io.OutputStream-long-long-byte:A-">copyLarge</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
long&nbsp;inputOffset,
long&nbsp;length,
byte[]&nbsp;buffer)</code>
<div class="block">Copies some or all bytes from a large (over 2GB) <code>InputStream</code> to an
<code>OutputStream</code>, optionally skipping input bytes.</div>
</td>
</tr>
<tr id="i45" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#copyLarge-java.io.Reader-java.io.Writer-">copyLarge</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer)</code>
<div class="block">Copies chars from a large (over 2GB) <code>Reader</code> to a <code>Writer</code>.</div>
</td>
</tr>
<tr id="i46" class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#copyLarge-java.io.Reader-java.io.Writer-char:A-">copyLarge</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer,
char[]&nbsp;buffer)</code>
<div class="block">Copies chars from a large (over 2GB) <code>Reader</code> to a <code>Writer</code>.</div>
</td>
</tr>
<tr id="i47" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#copyLarge-java.io.Reader-java.io.Writer-long-long-">copyLarge</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer,
long&nbsp;inputOffset,
long&nbsp;length)</code>
<div class="block">Copies some or all chars from a large (over 2GB) <code>InputStream</code> to an
<code>OutputStream</code>, optionally skipping input chars.</div>
</td>
</tr>
<tr id="i48" class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#copyLarge-java.io.Reader-java.io.Writer-long-long-char:A-">copyLarge</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer,
long&nbsp;inputOffset,
long&nbsp;length,
char[]&nbsp;buffer)</code>
<div class="block">Copies some or all chars from a large (over 2GB) <code>InputStream</code> to an
<code>OutputStream</code>, optionally skipping input chars.</div>
</td>
</tr>
<tr id="i49" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#length-byte:A-">length</a></span>(byte[]&nbsp;array)</code>
<div class="block">Returns the length of the given array in a null-safe manner.</div>
</td>
</tr>
<tr id="i50" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#length-char:A-">length</a></span>(char[]&nbsp;array)</code>
<div class="block">Returns the length of the given array in a null-safe manner.</div>
</td>
</tr>
<tr id="i51" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#length-java.lang.CharSequence-">length</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;csq)</code>
<div class="block">Returns the length of the given CharSequence in a null-safe manner.</div>
</td>
</tr>
<tr id="i52" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#length-java.lang.Object:A-">length</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>[]&nbsp;array)</code>
<div class="block">Returns the length of the given array in a null-safe manner.</div>
</td>
</tr>
<tr id="i53" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/commons/io/LineIterator.html" title="class in org.apache.commons.io">LineIterator</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#lineIterator-java.io.InputStream-java.nio.charset.Charset-">lineIterator</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset)</code>
<div class="block">Returns an Iterator for the lines in an <code>InputStream</code>, using
the character encoding specified (or default encoding if null).</div>
</td>
</tr>
<tr id="i54" class="altColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/commons/io/LineIterator.html" title="class in org.apache.commons.io">LineIterator</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#lineIterator-java.io.InputStream-java.lang.String-">lineIterator</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charsetName)</code>
<div class="block">Returns an Iterator for the lines in an <code>InputStream</code>, using
the character encoding specified (or default encoding if null).</div>
</td>
</tr>
<tr id="i55" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/commons/io/LineIterator.html" title="class in org.apache.commons.io">LineIterator</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#lineIterator-java.io.Reader-">lineIterator</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader)</code>
<div class="block">Returns an Iterator for the lines in a <code>Reader</code>.</div>
</td>
</tr>
<tr id="i56" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#read-java.io.InputStream-byte:A-">read</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
byte[]&nbsp;buffer)</code>
<div class="block">Reads bytes from an input stream.</div>
</td>
</tr>
<tr id="i57" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#read-java.io.InputStream-byte:A-int-int-">read</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
byte[]&nbsp;buffer,
int&nbsp;offset,
int&nbsp;length)</code>
<div class="block">Reads bytes from an input stream.</div>
</td>
</tr>
<tr id="i58" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#read-java.nio.channels.ReadableByteChannel-java.nio.ByteBuffer-">read</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/channels/ReadableByteChannel.html?is-external=true" title="class or interface in java.nio.channels">ReadableByteChannel</a>&nbsp;input,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;buffer)</code>
<div class="block">Reads bytes from a ReadableByteChannel.</div>
</td>
</tr>
<tr id="i59" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#read-java.io.Reader-char:A-">read</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
char[]&nbsp;buffer)</code>
<div class="block">Reads characters from an input character stream.</div>
</td>
</tr>
<tr id="i60" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#read-java.io.Reader-char:A-int-int-">read</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
char[]&nbsp;buffer,
int&nbsp;offset,
int&nbsp;length)</code>
<div class="block">Reads characters from an input character stream.</div>
</td>
</tr>
<tr id="i61" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#readFully-java.io.InputStream-byte:A-">readFully</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
byte[]&nbsp;buffer)</code>
<div class="block">Reads the requested number of bytes or fail if there are not enough left.</div>
</td>
</tr>
<tr id="i62" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#readFully-java.io.InputStream-byte:A-int-int-">readFully</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
byte[]&nbsp;buffer,
int&nbsp;offset,
int&nbsp;length)</code>
<div class="block">Reads the requested number of bytes or fail if there are not enough left.</div>
</td>
</tr>
<tr id="i63" class="rowColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#readFully-java.io.InputStream-int-">readFully</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
int&nbsp;length)</code>
<div class="block">Reads the requested number of bytes or fail if there are not enough left.</div>
</td>
</tr>
<tr id="i64" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#readFully-java.nio.channels.ReadableByteChannel-java.nio.ByteBuffer-">readFully</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/channels/ReadableByteChannel.html?is-external=true" title="class or interface in java.nio.channels">ReadableByteChannel</a>&nbsp;input,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;buffer)</code>
<div class="block">Reads the requested number of bytes or fail if there are not enough left.</div>
</td>
</tr>
<tr id="i65" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#readFully-java.io.Reader-char:A-">readFully</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
char[]&nbsp;buffer)</code>
<div class="block">Reads the requested number of characters or fail if there are not enough left.</div>
</td>
</tr>
<tr id="i66" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#readFully-java.io.Reader-char:A-int-int-">readFully</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
char[]&nbsp;buffer,
int&nbsp;offset,
int&nbsp;length)</code>
<div class="block">Reads the requested number of characters or fail if there are not enough left.</div>
</td>
</tr>
<tr id="i67" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#readLines-java.io.InputStream-">readLines</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#readLines-java.io.InputStream-java.nio.charset.Charset-"><code>readLines(InputStream, Charset)</code></a> instead</span></div>
</div>
</td>
</tr>
<tr id="i68" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#readLines-java.io.InputStream-java.nio.charset.Charset-">readLines</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset)</code>
<div class="block">Gets the contents of an <code>InputStream</code> as a list of Strings,
one entry per line, using the specified character encoding.</div>
</td>
</tr>
<tr id="i69" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#readLines-java.io.InputStream-java.lang.String-">readLines</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charsetName)</code>
<div class="block">Gets the contents of an <code>InputStream</code> as a list of Strings,
one entry per line, using the specified character encoding.</div>
</td>
</tr>
<tr id="i70" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#readLines-java.io.Reader-">readLines</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader)</code>
<div class="block">Gets the contents of a <code>Reader</code> as a list of Strings,
one entry per line.</div>
</td>
</tr>
<tr id="i71" class="rowColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#resourceToByteArray-java.lang.String-">resourceToByteArray</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name)</code>
<div class="block">Gets the contents of a classpath resource as a byte array.</div>
</td>
</tr>
<tr id="i72" class="altColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#resourceToByteArray-java.lang.String-java.lang.ClassLoader-">resourceToByteArray</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang">ClassLoader</a>&nbsp;classLoader)</code>
<div class="block">Gets the contents of a classpath resource as a byte array.</div>
</td>
</tr>
<tr id="i73" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#resourceToString-java.lang.String-java.nio.charset.Charset-">resourceToString</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset)</code>
<div class="block">Gets the contents of a classpath resource as a String using the
specified character encoding.</div>
</td>
</tr>
<tr id="i74" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#resourceToString-java.lang.String-java.nio.charset.Charset-java.lang.ClassLoader-">resourceToString</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang">ClassLoader</a>&nbsp;classLoader)</code>
<div class="block">Gets the contents of a classpath resource as a String using the
specified character encoding.</div>
</td>
</tr>
<tr id="i75" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#resourceToURL-java.lang.String-">resourceToURL</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name)</code>
<div class="block">Gets a URL pointing to the given classpath resource.</div>
</td>
</tr>
<tr id="i76" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#resourceToURL-java.lang.String-java.lang.ClassLoader-">resourceToURL</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang">ClassLoader</a>&nbsp;classLoader)</code>
<div class="block">Gets a URL pointing to the given classpath resource.</div>
</td>
</tr>
<tr id="i77" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#skip-java.io.InputStream-long-">skip</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
long&nbsp;toSkip)</code>
<div class="block">Skips bytes from an input byte stream.</div>
</td>
</tr>
<tr id="i78" class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#skip-java.nio.channels.ReadableByteChannel-long-">skip</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/channels/ReadableByteChannel.html?is-external=true" title="class or interface in java.nio.channels">ReadableByteChannel</a>&nbsp;input,
long&nbsp;toSkip)</code>
<div class="block">Skips bytes from a ReadableByteChannel.</div>
</td>
</tr>
<tr id="i79" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#skip-java.io.Reader-long-">skip</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
long&nbsp;toSkip)</code>
<div class="block">Skips characters from an input character stream.</div>
</td>
</tr>
<tr id="i80" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#skipFully-java.io.InputStream-long-">skipFully</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
long&nbsp;toSkip)</code>
<div class="block">Skips the requested number of bytes or fail if there are not enough left.</div>
</td>
</tr>
<tr id="i81" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#skipFully-java.nio.channels.ReadableByteChannel-long-">skipFully</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/channels/ReadableByteChannel.html?is-external=true" title="class or interface in java.nio.channels">ReadableByteChannel</a>&nbsp;input,
long&nbsp;toSkip)</code>
<div class="block">Skips the requested number of bytes or fail if there are not enough left.</div>
</td>
</tr>
<tr id="i82" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#skipFully-java.io.Reader-long-">skipFully</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
long&nbsp;toSkip)</code>
<div class="block">Skips the requested number of characters or fail if there are not enough left.</div>
</td>
</tr>
<tr id="i83" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toBufferedInputStream-java.io.InputStream-">toBufferedInputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input)</code>
<div class="block">Fetches entire contents of an <code>InputStream</code> and represent
same data as result InputStream.</div>
</td>
</tr>
<tr id="i84" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toBufferedInputStream-java.io.InputStream-int-">toBufferedInputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
int&nbsp;size)</code>
<div class="block">Fetches entire contents of an <code>InputStream</code> and represent
same data as result InputStream.</div>
</td>
</tr>
<tr id="i85" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io">BufferedReader</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toBufferedReader-java.io.Reader-">toBufferedReader</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader)</code>
<div class="block">Returns the given reader if it is a <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io"><code>BufferedReader</code></a>, otherwise creates a BufferedReader from the given
reader.</div>
</td>
</tr>
<tr id="i86" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io">BufferedReader</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toBufferedReader-java.io.Reader-int-">toBufferedReader</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
int&nbsp;size)</code>
<div class="block">Returns the given reader if it is a <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io"><code>BufferedReader</code></a>, otherwise creates a BufferedReader from the given
reader.</div>
</td>
</tr>
<tr id="i87" class="rowColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toByteArray-java.io.InputStream-">toByteArray</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;inputStream)</code>
<div class="block">Gets the contents of an <code>InputStream</code> as a <code>byte[]</code>.</div>
</td>
</tr>
<tr id="i88" class="altColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toByteArray-java.io.InputStream-int-">toByteArray</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
int&nbsp;size)</code>
<div class="block">Gets the contents of an <code>InputStream</code> as a <code>byte[]</code>.</div>
</td>
</tr>
<tr id="i89" class="rowColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toByteArray-java.io.InputStream-long-">toByteArray</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
long&nbsp;size)</code>
<div class="block">Gets contents of an <code>InputStream</code> as a <code>byte[]</code>.</div>
</td>
</tr>
<tr id="i90" class="altColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toByteArray-java.io.Reader-">toByteArray</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#toByteArray-java.io.Reader-java.nio.charset.Charset-"><code>toByteArray(Reader, Charset)</code></a> instead</span></div>
</div>
</td>
</tr>
<tr id="i91" class="rowColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toByteArray-java.io.Reader-java.nio.charset.Charset-">toByteArray</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset)</code>
<div class="block">Gets the contents of a <code>Reader</code> as a <code>byte[]</code>
using the specified character encoding.</div>
</td>
</tr>
<tr id="i92" class="altColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toByteArray-java.io.Reader-java.lang.String-">toByteArray</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charsetName)</code>
<div class="block">Gets the contents of a <code>Reader</code> as a <code>byte[]</code>
using the specified character encoding.</div>
</td>
</tr>
<tr id="i93" class="rowColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toByteArray-java.lang.String-">toByteArray</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;input)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">2.5 Use <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes--" title="class or interface in java.lang"><code>String.getBytes()</code></a> instead</span></div>
</div>
</td>
</tr>
<tr id="i94" class="altColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toByteArray-java.net.URI-">toByteArray</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</a>&nbsp;uri)</code>
<div class="block">Gets the contents of a <code>URI</code> as a <code>byte[]</code>.</div>
</td>
</tr>
<tr id="i95" class="rowColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toByteArray-java.net.URL-">toByteArray</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;url)</code>
<div class="block">Gets the contents of a <code>URL</code> as a <code>byte[]</code>.</div>
</td>
</tr>
<tr id="i96" class="altColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toByteArray-java.net.URLConnection-">toByteArray</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/net/URLConnection.html?is-external=true" title="class or interface in java.net">URLConnection</a>&nbsp;urlConn)</code>
<div class="block">Gets the contents of a <code>URLConnection</code> as a <code>byte[]</code>.</div>
</td>
</tr>
<tr id="i97" class="rowColor">
<td class="colFirst"><code>static char[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toCharArray-java.io.InputStream-">toCharArray</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;inputStream)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#toCharArray-java.io.InputStream-java.nio.charset.Charset-"><code>toCharArray(InputStream, Charset)</code></a> instead</span></div>
</div>
</td>
</tr>
<tr id="i98" class="altColor">
<td class="colFirst"><code>static char[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toCharArray-java.io.InputStream-java.nio.charset.Charset-">toCharArray</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;inputStream,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset)</code>
<div class="block">Gets the contents of an <code>InputStream</code> as a character array
using the specified character encoding.</div>
</td>
</tr>
<tr id="i99" class="rowColor">
<td class="colFirst"><code>static char[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toCharArray-java.io.InputStream-java.lang.String-">toCharArray</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;inputStream,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charsetName)</code>
<div class="block">Gets the contents of an <code>InputStream</code> as a character array
using the specified character encoding.</div>
</td>
</tr>
<tr id="i100" class="altColor">
<td class="colFirst"><code>static char[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toCharArray-java.io.Reader-">toCharArray</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader)</code>
<div class="block">Gets the contents of a <code>Reader</code> as a character array.</div>
</td>
</tr>
<tr id="i101" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toInputStream-java.lang.CharSequence-">toInputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;input)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#toInputStream-java.lang.CharSequence-java.nio.charset.Charset-"><code>toInputStream(CharSequence, Charset)</code></a> instead</span></div>
</div>
</td>
</tr>
<tr id="i102" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toInputStream-java.lang.CharSequence-java.nio.charset.Charset-">toInputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;input,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset)</code>
<div class="block">Converts the specified CharSequence to an input stream, encoded as bytes
using the specified character encoding.</div>
</td>
</tr>
<tr id="i103" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toInputStream-java.lang.CharSequence-java.lang.String-">toInputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;input,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charsetName)</code>
<div class="block">Converts the specified CharSequence to an input stream, encoded as bytes
using the specified character encoding.</div>
</td>
</tr>
<tr id="i104" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toInputStream-java.lang.String-">toInputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;input)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#toInputStream-java.lang.String-java.nio.charset.Charset-"><code>toInputStream(String, Charset)</code></a> instead</span></div>
</div>
</td>
</tr>
<tr id="i105" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toInputStream-java.lang.String-java.nio.charset.Charset-">toInputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;input,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset)</code>
<div class="block">Converts the specified string to an input stream, encoded as bytes
using the specified character encoding.</div>
</td>
</tr>
<tr id="i106" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toInputStream-java.lang.String-java.lang.String-">toInputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;input,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charsetName)</code>
<div class="block">Converts the specified string to an input stream, encoded as bytes
using the specified character encoding.</div>
</td>
</tr>
<tr id="i107" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toString-byte:A-">toString</a></span>(byte[]&nbsp;input)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">2.5 Use <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#String-byte:A-" title="class or interface in java.lang"><code>String(byte[])</code></a> instead</span></div>
</div>
</td>
</tr>
<tr id="i108" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toString-byte:A-java.lang.String-">toString</a></span>(byte[]&nbsp;input,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charsetName)</code>
<div class="block">Gets the contents of a <code>byte[]</code> as a String
using the specified character encoding.</div>
</td>
</tr>
<tr id="i109" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toString-java.io.InputStream-">toString</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#toString-java.io.InputStream-java.nio.charset.Charset-"><code>toString(InputStream, Charset)</code></a> instead</span></div>
</div>
</td>
</tr>
<tr id="i110" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toString-java.io.InputStream-java.nio.charset.Charset-">toString</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset)</code>
<div class="block">Gets the contents of an <code>InputStream</code> as a String
using the specified character encoding.</div>
</td>
</tr>
<tr id="i111" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toString-java.io.InputStream-java.lang.String-">toString</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charsetName)</code>
<div class="block">Gets the contents of an <code>InputStream</code> as a String
using the specified character encoding.</div>
</td>
</tr>
<tr id="i112" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toString-java.io.Reader-">toString</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader)</code>
<div class="block">Gets the contents of a <code>Reader</code> as a String.</div>
</td>
</tr>
<tr id="i113" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toString-java.net.URI-">toString</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</a>&nbsp;uri)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#toString-java.net.URI-java.nio.charset.Charset-"><code>toString(URI, Charset)</code></a> instead</span></div>
</div>
</td>
</tr>
<tr id="i114" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toString-java.net.URI-java.nio.charset.Charset-">toString</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</a>&nbsp;uri,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)</code>
<div class="block">Gets the contents at the given URI.</div>
</td>
</tr>
<tr id="i115" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toString-java.net.URI-java.lang.String-">toString</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</a>&nbsp;uri,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charsetName)</code>
<div class="block">Gets the contents at the given URI.</div>
</td>
</tr>
<tr id="i116" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toString-java.net.URL-">toString</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;url)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#toString-java.net.URL-java.nio.charset.Charset-"><code>toString(URL, Charset)</code></a> instead</span></div>
</div>
</td>
</tr>
<tr id="i117" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toString-java.net.URL-java.nio.charset.Charset-">toString</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;url,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)</code>
<div class="block">Gets the contents at the given URL.</div>
</td>
</tr>
<tr id="i118" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toString-java.net.URL-java.lang.String-">toString</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;url,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charsetName)</code>
<div class="block">Gets the contents at the given URL.</div>
</td>
</tr>
<tr id="i119" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#write-byte:A-java.io.OutputStream-">write</a></span>(byte[]&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)</code>
<div class="block">Writes bytes from a <code>byte[]</code> to an <code>OutputStream</code>.</div>
</td>
</tr>
<tr id="i120" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#write-byte:A-java.io.Writer-">write</a></span>(byte[]&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#write-byte:A-java.io.Writer-java.nio.charset.Charset-"><code>write(byte[], Writer, Charset)</code></a> instead</span></div>
</div>
</td>
</tr>
<tr id="i121" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#write-byte:A-java.io.Writer-java.nio.charset.Charset-">write</a></span>(byte[]&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset)</code>
<div class="block">Writes bytes from a <code>byte[]</code> to chars on a <code>Writer</code>
using the specified character encoding.</div>
</td>
</tr>
<tr id="i122" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#write-byte:A-java.io.Writer-java.lang.String-">write</a></span>(byte[]&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charsetName)</code>
<div class="block">Writes bytes from a <code>byte[]</code> to chars on a <code>Writer</code>
using the specified character encoding.</div>
</td>
</tr>
<tr id="i123" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#write-char:A-java.io.OutputStream-">write</a></span>(char[]&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#write-char:A-java.io.OutputStream-java.nio.charset.Charset-"><code>write(char[], OutputStream, Charset)</code></a> instead</span></div>
</div>
</td>
</tr>
<tr id="i124" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#write-char:A-java.io.OutputStream-java.nio.charset.Charset-">write</a></span>(char[]&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset)</code>
<div class="block">Writes chars from a <code>char[]</code> to bytes on an
<code>OutputStream</code> using the specified character encoding.</div>
</td>
</tr>
<tr id="i125" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#write-char:A-java.io.OutputStream-java.lang.String-">write</a></span>(char[]&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charsetName)</code>
<div class="block">Writes chars from a <code>char[]</code> to bytes on an
<code>OutputStream</code> using the specified character encoding.</div>
</td>
</tr>
<tr id="i126" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#write-char:A-java.io.Writer-">write</a></span>(char[]&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer)</code>
<div class="block">Writes chars from a <code>char[]</code> to a <code>Writer</code></div>
</td>
</tr>
<tr id="i127" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#write-java.lang.CharSequence-java.io.OutputStream-">write</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#write-java.lang.CharSequence-java.io.OutputStream-java.nio.charset.Charset-"><code>write(CharSequence, OutputStream, Charset)</code></a> instead</span></div>
</div>
</td>
</tr>
<tr id="i128" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#write-java.lang.CharSequence-java.io.OutputStream-java.nio.charset.Charset-">write</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset)</code>
<div class="block">Writes chars from a <code>CharSequence</code> to bytes on an
<code>OutputStream</code> using the specified character encoding.</div>
</td>
</tr>
<tr id="i129" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#write-java.lang.CharSequence-java.io.OutputStream-java.lang.String-">write</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charsetName)</code>
<div class="block">Writes chars from a <code>CharSequence</code> to bytes on an
<code>OutputStream</code> using the specified character encoding.</div>
</td>
</tr>
<tr id="i130" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#write-java.lang.CharSequence-java.io.Writer-">write</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer)</code>
<div class="block">Writes chars from a <code>CharSequence</code> to a <code>Writer</code>.</div>
</td>
</tr>
<tr id="i131" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#write-java.lang.StringBuffer-java.io.OutputStream-">write</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/StringBuffer.html?is-external=true" title="class or interface in java.lang">StringBuffer</a>&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">replaced by write(CharSequence, OutputStream)</span></div>
</div>
</td>
</tr>
<tr id="i132" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#write-java.lang.StringBuffer-java.io.OutputStream-java.lang.String-">write</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/StringBuffer.html?is-external=true" title="class or interface in java.lang">StringBuffer</a>&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charsetName)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">replaced by write(CharSequence, OutputStream, String)</span></div>
</div>
</td>
</tr>
<tr id="i133" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#write-java.lang.StringBuffer-java.io.Writer-">write</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/StringBuffer.html?is-external=true" title="class or interface in java.lang">StringBuffer</a>&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">replaced by write(CharSequence, Writer)</span></div>
</div>
</td>
</tr>
<tr id="i134" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#write-java.lang.String-java.io.OutputStream-">write</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#write-java.lang.String-java.io.OutputStream-java.nio.charset.Charset-"><code>write(String, OutputStream, Charset)</code></a> instead</span></div>
</div>
</td>
</tr>
<tr id="i135" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#write-java.lang.String-java.io.OutputStream-java.nio.charset.Charset-">write</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset)</code>
<div class="block">Writes chars from a <code>String</code> to bytes on an
<code>OutputStream</code> using the specified character encoding.</div>
</td>
</tr>
<tr id="i136" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#write-java.lang.String-java.io.OutputStream-java.lang.String-">write</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charsetName)</code>
<div class="block">Writes chars from a <code>String</code> to bytes on an
<code>OutputStream</code> using the specified character encoding.</div>
</td>
</tr>
<tr id="i137" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#write-java.lang.String-java.io.Writer-">write</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer)</code>
<div class="block">Writes chars from a <code>String</code> to a <code>Writer</code>.</div>
</td>
</tr>
<tr id="i138" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#writeChunked-byte:A-java.io.OutputStream-">writeChunked</a></span>(byte[]&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)</code>
<div class="block">Writes bytes from a <code>byte[]</code> to an <code>OutputStream</code> using chunked writes.</div>
</td>
</tr>
<tr id="i139" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#writeChunked-char:A-java.io.Writer-">writeChunked</a></span>(char[]&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer)</code>
<div class="block">Writes chars from a <code>char[]</code> to a <code>Writer</code> using chunked writes.</div>
</td>
</tr>
<tr id="i140" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#writeLines-java.util.Collection-java.lang.String-java.io.OutputStream-">writeLines</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;lines,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;lineEnding,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#writeLines-java.util.Collection-java.lang.String-java.io.OutputStream-java.nio.charset.Charset-"><code>writeLines(Collection, String, OutputStream, Charset)</code></a> instead</span></div>
</div>
</td>
</tr>
<tr id="i141" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#writeLines-java.util.Collection-java.lang.String-java.io.OutputStream-java.nio.charset.Charset-">writeLines</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;lines,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;lineEnding,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset)</code>
<div class="block">Writes the <code>toString()</code> value of each item in a collection to
an <code>OutputStream</code> line by line, using the specified character
encoding and the specified line ending.</div>
</td>
</tr>
<tr id="i142" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#writeLines-java.util.Collection-java.lang.String-java.io.OutputStream-java.lang.String-">writeLines</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;lines,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;lineEnding,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charsetName)</code>
<div class="block">Writes the <code>toString()</code> value of each item in a collection to
an <code>OutputStream</code> line by line, using the specified character
encoding and the specified line ending.</div>
</td>
</tr>
<tr id="i143" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#writeLines-java.util.Collection-java.lang.String-java.io.Writer-">writeLines</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;lines,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;lineEnding,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer)</code>
<div class="block">Writes the <code>toString()</code> value of each item in a collection to
a <code>Writer</code> line by line, using the specified line ending.</div>
</td>
</tr>
<tr id="i144" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#writer-java.lang.Appendable-">writer</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang">Appendable</a>&nbsp;appendable)</code>
<div class="block">Returns the given Appendable if it is already a <a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io"><code>Writer</code></a>, otherwise creates a Writer wrapper around the
given Appendable.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="CR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CR</h4>
<pre>public static final&nbsp;int CR</pre>
<div class="block">CR char.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.9.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#org.apache.commons.io.IOUtils.CR">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_BUFFER_SIZE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_BUFFER_SIZE</h4>
<pre>public static final&nbsp;int DEFAULT_BUFFER_SIZE</pre>
<div class="block">The default buffer size (8192) to use in copy methods.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#org.apache.commons.io.IOUtils.DEFAULT_BUFFER_SIZE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DIR_SEPARATOR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DIR_SEPARATOR</h4>
<pre>public static final&nbsp;char DIR_SEPARATOR</pre>
<div class="block">The system directory separator character.</div>
</li>
</ul>
<a name="DIR_SEPARATOR_UNIX">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DIR_SEPARATOR_UNIX</h4>
<pre>public static final&nbsp;char DIR_SEPARATOR_UNIX</pre>
<div class="block">The Unix directory separator character.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#org.apache.commons.io.IOUtils.DIR_SEPARATOR_UNIX">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DIR_SEPARATOR_WINDOWS">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DIR_SEPARATOR_WINDOWS</h4>
<pre>public static final&nbsp;char DIR_SEPARATOR_WINDOWS</pre>
<div class="block">The Windows directory separator character.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#org.apache.commons.io.IOUtils.DIR_SEPARATOR_WINDOWS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="EMPTY_BYTE_ARRAY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>EMPTY_BYTE_ARRAY</h4>
<pre>public static final&nbsp;byte[] EMPTY_BYTE_ARRAY</pre>
<div class="block">A singleton empty byte array.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.9.0</dd>
</dl>
</li>
</ul>
<a name="EOF">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>EOF</h4>
<pre>public static final&nbsp;int EOF</pre>
<div class="block">Represents the end-of-file (or stream).</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.5 (made public)</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#org.apache.commons.io.IOUtils.EOF">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="LF">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LF</h4>
<pre>public static final&nbsp;int LF</pre>
<div class="block">LF char.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.9.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#org.apache.commons.io.IOUtils.LF">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="LINE_SEPARATOR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LINE_SEPARATOR</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static final&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> LINE_SEPARATOR</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">Use <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/System.html?is-external=true#lineSeparator--" title="class or interface in java.lang"><code>System.lineSeparator()</code></a>.</span></div>
<div class="block">The system line separator string.</div>
</li>
</ul>
<a name="LINE_SEPARATOR_UNIX">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LINE_SEPARATOR_UNIX</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> LINE_SEPARATOR_UNIX</pre>
<div class="block">The Unix line separator string.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/apache/commons/io/StandardLineSeparator.html#LF"><code>StandardLineSeparator.LF</code></a></dd>
</dl>
</li>
</ul>
<a name="LINE_SEPARATOR_WINDOWS">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>LINE_SEPARATOR_WINDOWS</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> LINE_SEPARATOR_WINDOWS</pre>
<div class="block">The Windows line separator string.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/apache/commons/io/StandardLineSeparator.html#CRLF"><code>StandardLineSeparator.CRLF</code></a></dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="IOUtils--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>IOUtils</h4>
<pre>public&nbsp;IOUtils()</pre>
<div class="block">Instances should NOT be constructed in standard programming.</div>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="buffer-java.io.InputStream-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>buffer</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedInputStream.html?is-external=true" title="class or interface in java.io">BufferedInputStream</a>&nbsp;buffer(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;inputStream)</pre>
<div class="block">Returns the given InputStream if it is already a <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedInputStream.html?is-external=true" title="class or interface in java.io"><code>BufferedInputStream</code></a>, otherwise creates a
BufferedInputStream from the given InputStream.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>inputStream</code> - the InputStream to wrap or return (not null)</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the given InputStream or a new <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedInputStream.html?is-external=true" title="class or interface in java.io"><code>BufferedInputStream</code></a> for the given InputStream</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input parameter is null</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.5</dd>
</dl>
</li>
</ul>
<a name="buffer-java.io.InputStream-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>buffer</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedInputStream.html?is-external=true" title="class or interface in java.io">BufferedInputStream</a>&nbsp;buffer(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;inputStream,
int&nbsp;size)</pre>
<div class="block">Returns the given InputStream if it is already a <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedInputStream.html?is-external=true" title="class or interface in java.io"><code>BufferedInputStream</code></a>, otherwise creates a
BufferedInputStream from the given InputStream.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>inputStream</code> - the InputStream to wrap or return (not null)</dd>
<dd><code>size</code> - the buffer size, if a new BufferedInputStream is created.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the given InputStream or a new <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedInputStream.html?is-external=true" title="class or interface in java.io"><code>BufferedInputStream</code></a> for the given InputStream</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input parameter is null</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.5</dd>
</dl>
</li>
</ul>
<a name="buffer-java.io.OutputStream-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>buffer</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedOutputStream.html?is-external=true" title="class or interface in java.io">BufferedOutputStream</a>&nbsp;buffer(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;outputStream)</pre>
<div class="block">Returns the given OutputStream if it is already a <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedOutputStream.html?is-external=true" title="class or interface in java.io"><code>BufferedOutputStream</code></a>, otherwise creates a
BufferedOutputStream from the given OutputStream.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>outputStream</code> - the OutputStream to wrap or return (not null)</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the given OutputStream or a new <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedOutputStream.html?is-external=true" title="class or interface in java.io"><code>BufferedOutputStream</code></a> for the given OutputStream</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input parameter is null</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.5</dd>
</dl>
</li>
</ul>
<a name="buffer-java.io.OutputStream-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>buffer</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedOutputStream.html?is-external=true" title="class or interface in java.io">BufferedOutputStream</a>&nbsp;buffer(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;outputStream,
int&nbsp;size)</pre>
<div class="block">Returns the given OutputStream if it is already a <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedOutputStream.html?is-external=true" title="class or interface in java.io"><code>BufferedOutputStream</code></a>, otherwise creates a
BufferedOutputStream from the given OutputStream.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>outputStream</code> - the OutputStream to wrap or return (not null)</dd>
<dd><code>size</code> - the buffer size, if a new BufferedOutputStream is created.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the given OutputStream or a new <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedOutputStream.html?is-external=true" title="class or interface in java.io"><code>BufferedOutputStream</code></a> for the given OutputStream</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input parameter is null</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.5</dd>
</dl>
</li>
</ul>
<a name="buffer-java.io.Reader-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>buffer</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io">BufferedReader</a>&nbsp;buffer(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader)</pre>
<div class="block">Returns the given reader if it is already a <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io"><code>BufferedReader</code></a>, otherwise creates a BufferedReader from
the given reader.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reader</code> - the reader to wrap or return (not null)</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the given reader or a new <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io"><code>BufferedReader</code></a> for the given reader</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input parameter is null</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.5</dd>
</dl>
</li>
</ul>
<a name="buffer-java.io.Reader-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>buffer</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io">BufferedReader</a>&nbsp;buffer(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
int&nbsp;size)</pre>
<div class="block">Returns the given reader if it is already a <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io"><code>BufferedReader</code></a>, otherwise creates a BufferedReader from the
given reader.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reader</code> - the reader to wrap or return (not null)</dd>
<dd><code>size</code> - the buffer size, if a new BufferedReader is created.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the given reader or a new <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io"><code>BufferedReader</code></a> for the given reader</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input parameter is null</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.5</dd>
</dl>
</li>
</ul>
<a name="buffer-java.io.Writer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>buffer</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedWriter.html?is-external=true" title="class or interface in java.io">BufferedWriter</a>&nbsp;buffer(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer)</pre>
<div class="block">Returns the given Writer if it is already a <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedWriter.html?is-external=true" title="class or interface in java.io"><code>BufferedWriter</code></a>, otherwise creates a BufferedWriter from the
given Writer.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>writer</code> - the Writer to wrap or return (not null)</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the given Writer or a new <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedWriter.html?is-external=true" title="class or interface in java.io"><code>BufferedWriter</code></a> for the given Writer</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input parameter is null</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.5</dd>
</dl>
</li>
</ul>
<a name="buffer-java.io.Writer-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>buffer</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedWriter.html?is-external=true" title="class or interface in java.io">BufferedWriter</a>&nbsp;buffer(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer,
int&nbsp;size)</pre>
<div class="block">Returns the given Writer if it is already a <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedWriter.html?is-external=true" title="class or interface in java.io"><code>BufferedWriter</code></a>, otherwise creates a BufferedWriter from the
given Writer.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>writer</code> - the Writer to wrap or return (not null)</dd>
<dd><code>size</code> - the buffer size, if a new BufferedWriter is created.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the given Writer or a new <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedWriter.html?is-external=true" title="class or interface in java.io"><code>BufferedWriter</code></a> for the given Writer</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input parameter is null</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.5</dd>
</dl>
</li>
</ul>
<a name="byteArray--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>byteArray</h4>
<pre>public static&nbsp;byte[]&nbsp;byteArray()</pre>
<div class="block">Returns a new byte array of size <a href="../../../../org/apache/commons/io/IOUtils.html#DEFAULT_BUFFER_SIZE"><code>DEFAULT_BUFFER_SIZE</code></a>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a new byte array of size <a href="../../../../org/apache/commons/io/IOUtils.html#DEFAULT_BUFFER_SIZE"><code>DEFAULT_BUFFER_SIZE</code></a>.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.9.0</dd>
</dl>
</li>
</ul>
<a name="byteArray-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>byteArray</h4>
<pre>public static&nbsp;byte[]&nbsp;byteArray(int&nbsp;size)</pre>
<div class="block">Returns a new byte array of the given size.
TODO Consider guarding or warning against large allocations...</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>size</code> - array size.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a new byte array of the given size.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.9.0</dd>
</dl>
</li>
</ul>
<a name="close-java.io.Closeable-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>close</h4>
<pre>public static&nbsp;void&nbsp;close(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>&nbsp;closeable)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Closes the given <a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io"><code>Closeable</code></a> as a null-safe operation.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>closeable</code> - The resource to close, may be null.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/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.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.7</dd>
</dl>
</li>
</ul>
<a name="close-java.io.Closeable...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>close</h4>
<pre>public static&nbsp;void&nbsp;close(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>...&nbsp;closeables)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Closes the given <a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io"><code>Closeable</code></a> as a null-safe operation.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>closeables</code> - The resource(s) to close, may be null.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/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.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.8.0</dd>
</dl>
</li>
</ul>
<a name="close-java.io.Closeable-org.apache.commons.io.function.IOConsumer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>close</h4>
<pre>public static&nbsp;void&nbsp;close(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>&nbsp;closeable,
<a href="../../../../org/apache/commons/io/function/IOConsumer.html" title="interface in org.apache.commons.io.function">IOConsumer</a>&lt;<a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>&gt;&nbsp;consumer)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Closes the given <a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io"><code>Closeable</code></a> as a null-safe operation.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>closeable</code> - The resource to close, may be null.</dd>
<dd><code>consumer</code> - Consume the IOException thrown by <a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true#close--" title="class or interface in java.io"><code>Closeable.close()</code></a>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/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.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.7</dd>
</dl>
</li>
</ul>
<a name="close-java.net.URLConnection-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>close</h4>
<pre>public static&nbsp;void&nbsp;close(<a href="https://docs.oracle.com/javase/7/docs/api/java/net/URLConnection.html?is-external=true" title="class or interface in java.net">URLConnection</a>&nbsp;conn)</pre>
<div class="block">Closes a URLConnection.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>conn</code> - the connection to close.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.4</dd>
</dl>
</li>
</ul>
<a name="closeQuietly-java.io.Closeable-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>closeQuietly</h4>
<pre>public static&nbsp;void&nbsp;closeQuietly(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>&nbsp;closeable)</pre>
<div class="block">Closes a <code>Closeable</code> unconditionally.
<p>
Equivalent to <a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true#close--" title="class or interface in java.io"><code>Closeable.close()</code></a>, except any exceptions will be ignored. This is typically used in
finally blocks.
<p>
Example code:
</p>
<pre>
Closeable closeable = null;
try {
closeable = new FileReader(&quot;foo.txt&quot;);
// process closeable
closeable.close();
} catch (Exception e) {
// error handling
} finally {
IOUtils.closeQuietly(closeable);
}
</pre>
<p>
Closing all streams:
</p>
<pre>
try {
return IOUtils.copy(inputStream, outputStream);
} finally {
IOUtils.closeQuietly(inputStream);
IOUtils.closeQuietly(outputStream);
}
</pre>
<p>
Also consider using a try-with-resources statement where appropriate.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>closeable</code> - the objects to close, may be null or already closed</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#addSuppressed-java.lang.Throwable-" title="class or interface in java.lang"><code>Throwable.addSuppressed(java.lang.Throwable)</code></a></dd>
</dl>
</li>
</ul>
<a name="closeQuietly-java.io.Closeable...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>closeQuietly</h4>
<pre>public static&nbsp;void&nbsp;closeQuietly(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>...&nbsp;closeables)</pre>
<div class="block">Closes a <code>Closeable</code> unconditionally.
<p>
Equivalent to <a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true#close--" title="class or interface in java.io"><code>Closeable.close()</code></a>, except any exceptions will be ignored.
<p>
This is typically used in finally blocks to ensure that the closeable is closed
even if an Exception was thrown before the normal close statement was reached.
<br>
<b>It should not be used to replace the close statement(s)
which should be present for the non-exceptional case.</b>
<br>
It is only intended to simplify tidying up where normal processing has already failed
and reporting close failure as well is not necessary or useful.
<p>
Example code:
</p>
<pre>
Closeable closeable = null;
try {
closeable = new FileReader(&quot;foo.txt&quot;);
// processing using the closeable; may throw an Exception
closeable.close(); // Normal close - exceptions not ignored
} catch (Exception e) {
// error handling
} finally {
<b>IOUtils.closeQuietly(closeable); // In case normal close was skipped due to Exception</b>
}
</pre>
<p>
Closing all streams:
<br>
<pre>
try {
return IOUtils.copy(inputStream, outputStream);
} finally {
IOUtils.closeQuietly(inputStream, outputStream);
}
</pre>
<p>
Also consider using a try-with-resources statement where appropriate.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>closeables</code> - the objects to close, may be null or already closed</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.5</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/apache/commons/io/IOUtils.html#closeQuietly-java.io.Closeable-"><code>closeQuietly(Closeable)</code></a>,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#addSuppressed-java.lang.Throwable-" title="class or interface in java.lang"><code>Throwable.addSuppressed(java.lang.Throwable)</code></a></dd>
</dl>
</li>
</ul>
<a name="closeQuietly-java.io.Closeable-java.util.function.Consumer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>closeQuietly</h4>
<pre>public static&nbsp;void&nbsp;closeQuietly(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>&nbsp;closeable,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html?is-external=true" title="class or interface in java.util.function">Consumer</a>&lt;<a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>&gt;&nbsp;consumer)</pre>
<div class="block">Closes the given <a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io"><code>Closeable</code></a> as a null-safe operation while consuming IOException by the given <code>consumer</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>closeable</code> - The resource to close, may be null.</dd>
<dd><code>consumer</code> - Consumes the IOException thrown by <a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true#close--" title="class or interface in java.io"><code>Closeable.close()</code></a>.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.7</dd>
</dl>
</li>
</ul>
<a name="closeQuietly-java.io.InputStream-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>closeQuietly</h4>
<pre>public static&nbsp;void&nbsp;closeQuietly(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input)</pre>
<div class="block">Closes an <code>InputStream</code> unconditionally.
<p>
Equivalent to <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true#close--" title="class or interface in java.io"><code>InputStream.close()</code></a>, except any exceptions will be ignored.
This is typically used in finally blocks.
<p>
Example code:
<pre>
byte[] data = new byte[1024];
InputStream in = null;
try {
in = new FileInputStream("foo.txt");
in.read(data);
in.close(); //close errors are handled
} catch (Exception e) {
// error handling
} finally {
IOUtils.closeQuietly(in);
}
</pre>
<p>
Also consider using a try-with-resources statement where appropriate.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - the InputStream to close, may be null or already closed</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#addSuppressed-java.lang.Throwable-" title="class or interface in java.lang"><code>Throwable.addSuppressed(java.lang.Throwable)</code></a></dd>
</dl>
</li>
</ul>
<a name="closeQuietly-java.io.OutputStream-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>closeQuietly</h4>
<pre>public static&nbsp;void&nbsp;closeQuietly(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)</pre>
<div class="block">Closes an <code>OutputStream</code> unconditionally.
<p>
Equivalent to <a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true#close--" title="class or interface in java.io"><code>OutputStream.close()</code></a>, except any exceptions will be ignored.
This is typically used in finally blocks.
<p>
Example code:
<pre>
byte[] data = "Hello, World".getBytes();
OutputStream out = null;
try {
out = new FileOutputStream("foo.txt");
out.write(data);
out.close(); //close errors are handled
} catch (IOException e) {
// error handling
} finally {
IOUtils.closeQuietly(out);
}
</pre>
<p>
Also consider using a try-with-resources statement where appropriate.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>output</code> - the OutputStream to close, may be null or already closed</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#addSuppressed-java.lang.Throwable-" title="class or interface in java.lang"><code>Throwable.addSuppressed(java.lang.Throwable)</code></a></dd>
</dl>
</li>
</ul>
<a name="closeQuietly-java.io.Reader-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>closeQuietly</h4>
<pre>public static&nbsp;void&nbsp;closeQuietly(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader)</pre>
<div class="block">Closes an <code>Reader</code> unconditionally.
<p>
Equivalent to <a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true#close--" title="class or interface in java.io"><code>Reader.close()</code></a>, except any exceptions will be ignored.
This is typically used in finally blocks.
<p>
Example code:
<pre>
char[] data = new char[1024];
Reader in = null;
try {
in = new FileReader("foo.txt");
in.read(data);
in.close(); //close errors are handled
} catch (Exception e) {
// error handling
} finally {
IOUtils.closeQuietly(in);
}
</pre>
<p>
Also consider using a try-with-resources statement where appropriate.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reader</code> - the Reader to close, may be null or already closed</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#addSuppressed-java.lang.Throwable-" title="class or interface in java.lang"><code>Throwable.addSuppressed(java.lang.Throwable)</code></a></dd>
</dl>
</li>
</ul>
<a name="closeQuietly-java.nio.channels.Selector-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>closeQuietly</h4>
<pre>public static&nbsp;void&nbsp;closeQuietly(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/channels/Selector.html?is-external=true" title="class or interface in java.nio.channels">Selector</a>&nbsp;selector)</pre>
<div class="block">Closes a <code>Selector</code> unconditionally.
<p>
Equivalent to <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/channels/Selector.html?is-external=true#close--" title="class or interface in java.nio.channels"><code>Selector.close()</code></a>, except any exceptions will be ignored.
This is typically used in finally blocks.
<p>
Example code:
<pre>
Selector selector = null;
try {
selector = Selector.open();
// process socket
} catch (Exception e) {
// error handling
} finally {
IOUtils.closeQuietly(selector);
}
</pre>
<p>
Also consider using a try-with-resources statement where appropriate.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>selector</code> - the Selector to close, may be null or already closed</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.2</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#addSuppressed-java.lang.Throwable-" title="class or interface in java.lang"><code>Throwable.addSuppressed(java.lang.Throwable)</code></a></dd>
</dl>
</li>
</ul>
<a name="closeQuietly-java.net.ServerSocket-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>closeQuietly</h4>
<pre>public static&nbsp;void&nbsp;closeQuietly(<a href="https://docs.oracle.com/javase/7/docs/api/java/net/ServerSocket.html?is-external=true" title="class or interface in java.net">ServerSocket</a>&nbsp;serverSocket)</pre>
<div class="block">Closes a <code>ServerSocket</code> unconditionally.
<p>
Equivalent to <a href="https://docs.oracle.com/javase/7/docs/api/java/net/ServerSocket.html?is-external=true#close--" title="class or interface in java.net"><code>ServerSocket.close()</code></a>, except any exceptions will be ignored.
This is typically used in finally blocks.
<p>
Example code:
<pre>
ServerSocket socket = null;
try {
socket = new ServerSocket();
// process socket
socket.close();
} catch (Exception e) {
// error handling
} finally {
IOUtils.closeQuietly(socket);
}
</pre>
<p>
Also consider using a try-with-resources statement where appropriate.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>serverSocket</code> - the ServerSocket to close, may be null or already closed</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.2</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#addSuppressed-java.lang.Throwable-" title="class or interface in java.lang"><code>Throwable.addSuppressed(java.lang.Throwable)</code></a></dd>
</dl>
</li>
</ul>
<a name="closeQuietly-java.net.Socket-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>closeQuietly</h4>
<pre>public static&nbsp;void&nbsp;closeQuietly(<a href="https://docs.oracle.com/javase/7/docs/api/java/net/Socket.html?is-external=true" title="class or interface in java.net">Socket</a>&nbsp;socket)</pre>
<div class="block">Closes a <code>Socket</code> unconditionally.
<p>
Equivalent to <a href="https://docs.oracle.com/javase/7/docs/api/java/net/Socket.html?is-external=true#close--" title="class or interface in java.net"><code>Socket.close()</code></a>, except any exceptions will be ignored.
This is typically used in finally blocks.
<p>
Example code:
<pre>
Socket socket = null;
try {
socket = new Socket("http://www.foo.com/", 80);
// process socket
socket.close();
} catch (Exception e) {
// error handling
} finally {
IOUtils.closeQuietly(socket);
}
</pre>
<p>
Also consider using a try-with-resources statement where appropriate.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>socket</code> - the Socket to close, may be null or already closed</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#addSuppressed-java.lang.Throwable-" title="class or interface in java.lang"><code>Throwable.addSuppressed(java.lang.Throwable)</code></a></dd>
</dl>
</li>
</ul>
<a name="closeQuietly-java.io.Writer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>closeQuietly</h4>
<pre>public static&nbsp;void&nbsp;closeQuietly(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer)</pre>
<div class="block">Closes an <code>Writer</code> unconditionally.
<p>
Equivalent to <a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true#close--" title="class or interface in java.io"><code>Writer.close()</code></a>, except any exceptions will be ignored.
This is typically used in finally blocks.
<p>
Example code:
<pre>
Writer out = null;
try {
out = new StringWriter();
out.write("Hello World");
out.close(); //close errors are handled
} catch (Exception e) {
// error handling
} finally {
IOUtils.closeQuietly(out);
}
</pre>
<p>
Also consider using a try-with-resources statement where appropriate.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>writer</code> - the Writer to close, may be null or already closed</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#addSuppressed-java.lang.Throwable-" title="class or interface in java.lang"><code>Throwable.addSuppressed(java.lang.Throwable)</code></a></dd>
</dl>
</li>
</ul>
<a name="consume-java.io.InputStream-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>consume</h4>
<pre>public static&nbsp;long&nbsp;consume(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Consumes bytes from a <code>InputStream</code> and ignores them.
<p>
The buffer size is given by <a href="../../../../org/apache/commons/io/IOUtils.html#DEFAULT_BUFFER_SIZE"><code>DEFAULT_BUFFER_SIZE</code></a>.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - the <code>InputStream</code> to read.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of bytes copied. or <code>0</code> if <code>input is null</code>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the InputStream is <code>null</code>.</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the OutputStream is <code>null</code>.</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.8.0</dd>
</dl>
</li>
</ul>
<a name="contentEquals-java.io.InputStream-java.io.InputStream-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>contentEquals</h4>
<pre>public static&nbsp;boolean&nbsp;contentEquals(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input1,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input2)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Compares the contents of two Streams to determine if they are equal or
not.
<p>
This method buffers the input internally using
<code>BufferedInputStream</code> if they are not already buffered.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input1</code> - the first stream</dd>
<dd><code>input2</code> - the second stream</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the content of the streams are equal or they both don't
exist, false otherwise</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if either input is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
</dl>
</li>
</ul>
<a name="contentEquals-java.io.Reader-java.io.Reader-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>contentEquals</h4>
<pre>public static&nbsp;boolean&nbsp;contentEquals(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input1,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input2)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Compares the contents of two Readers to determine if they are equal or not.
<p>
This method buffers the input internally using <code>BufferedReader</code> if they are not already buffered.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input1</code> - the first reader</dd>
<dd><code>input2</code> - the second reader</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the content of the readers are equal or they both don't exist, false otherwise</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if either input is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="contentEqualsIgnoreEOL-java.io.Reader-java.io.Reader-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>contentEqualsIgnoreEOL</h4>
<pre>public static&nbsp;boolean&nbsp;contentEqualsIgnoreEOL(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader1,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader2)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Compares the contents of two Readers to determine if they are equal or
not, ignoring EOL characters.
<p>
This method buffers the input internally using
<code>BufferedReader</code> if they are not already buffered.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reader1</code> - the first reader</dd>
<dd><code>reader2</code> - the second reader</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the content of the readers are equal (ignoring EOL differences), false otherwise</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if either input is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.2</dd>
</dl>
</li>
</ul>
<a name="copy-java.io.InputStream-java.io.OutputStream-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copy</h4>
<pre>public static&nbsp;int&nbsp;copy(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;inputStream,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;outputStream)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Copies bytes from an <code>InputStream</code> to an <code>OutputStream</code>.
<p>
This method buffers the input internally, so there is no need to use a <code>BufferedInputStream</code>.
</p>
<p>
Large streams (over 2GB) will return a bytes copied value of <code>-1</code> after the copy has completed since
the correct number of bytes cannot be returned as an int. For large streams use the
<code>copyLarge(InputStream, OutputStream)</code> method.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>inputStream</code> - the <code>InputStream</code> to read.</dd>
<dd><code>outputStream</code> - the <code>OutputStream</code> to write.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of bytes copied, or -1 if greater than <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html?is-external=true#MAX_VALUE" title="class or interface in java.lang"><code>Integer.MAX_VALUE</code></a>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the InputStream is <code>null</code>.</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the OutputStream is <code>null</code>.</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="copy-java.io.InputStream-java.io.OutputStream-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copy</h4>
<pre>public static&nbsp;long&nbsp;copy(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;inputStream,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;outputStream,
int&nbsp;bufferSize)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Copies bytes from an <code>InputStream</code> to an <code>OutputStream</code> using an internal buffer of the
given size.
<p>
This method buffers the input internally, so there is no need to use a <code>BufferedInputStream</code>.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>inputStream</code> - the <code>InputStream</code> to read.</dd>
<dd><code>outputStream</code> - the <code>OutputStream</code> to write to</dd>
<dd><code>bufferSize</code> - the bufferSize used to copy from the input to the output</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of bytes copied.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the InputStream is <code>null</code>.</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the OutputStream is <code>null</code>.</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.5</dd>
</dl>
</li>
</ul>
<a name="copy-java.io.InputStream-java.io.Writer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copy</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static&nbsp;void&nbsp;copy(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#copy-java.io.InputStream-java.io.Writer-java.nio.charset.Charset-"><code>copy(InputStream, Writer, Charset)</code></a> instead</span></div>
<div class="block">Copies bytes from an <code>InputStream</code> to chars on a
<code>Writer</code> using the default character encoding of the platform.
<p>
This method buffers the input internally, so there is no need to use a
<code>BufferedInputStream</code>.
<p>
This method uses <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStreamReader.html?is-external=true" title="class or interface in java.io"><code>InputStreamReader</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - the <code>InputStream</code> to read from</dd>
<dd><code>writer</code> - the <code>Writer</code> to write to</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input or output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="copy-java.io.InputStream-java.io.Writer-java.nio.charset.Charset-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copy</h4>
<pre>public static&nbsp;void&nbsp;copy(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;inputCharset)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Copies bytes from an <code>InputStream</code> to chars on a
<code>Writer</code> using the specified character encoding.
<p>
This method buffers the input internally, so there is no need to use a
<code>BufferedInputStream</code>.
<p>
This method uses <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStreamReader.html?is-external=true" title="class or interface in java.io"><code>InputStreamReader</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - the <code>InputStream</code> to read from</dd>
<dd><code>writer</code> - the <code>Writer</code> to write to</dd>
<dd><code>inputCharset</code> - the charset to use for the input stream, null means platform default</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input or output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.3</dd>
</dl>
</li>
</ul>
<a name="copy-java.io.InputStream-java.io.Writer-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copy</h4>
<pre>public static&nbsp;void&nbsp;copy(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;inputCharsetName)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Copies bytes from an <code>InputStream</code> to chars on a
<code>Writer</code> using the specified character encoding.
<p>
This method buffers the input internally, so there is no need to use a
<code>BufferedInputStream</code>.
<p>
Character encoding names can be found at
<a href="http://www.iana.org/assignments/character-sets">IANA</a>.
<p>
This method uses <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStreamReader.html?is-external=true" title="class or interface in java.io"><code>InputStreamReader</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - the <code>InputStream</code> to read from</dd>
<dd><code>writer</code> - the <code>Writer</code> to write to</dd>
<dd><code>inputCharsetName</code> - the name of the requested charset for the InputStream, null means platform default</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input or output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - thrown instead of <a href="https://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html?is-external=true"><code>.UnsupportedEncodingException</code></a> in version 2.2 if the
encoding is not supported.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="copy-java.io.Reader-java.lang.Appendable-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copy</h4>
<pre>public static&nbsp;long&nbsp;copy(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang">Appendable</a>&nbsp;output)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Copies chars from a <code>Reader</code> to a <code>Appendable</code>.
<p>
This method buffers the input internally, so there is no need to use a
<code>BufferedReader</code>.
<p>
Large streams (over 2GB) will return a chars copied value of
<code>-1</code> after the copy has completed since the correct
number of chars cannot be returned as an int. For large streams
use the <code>copyLarge(Reader, Writer)</code> method.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reader</code> - the <code>Reader</code> to read from</dd>
<dd><code>output</code> - the <code>Appendable</code> to write to</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of characters copied, or -1 if &gt; Integer.MAX_VALUE</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input or output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.7</dd>
</dl>
</li>
</ul>
<a name="copy-java.io.Reader-java.lang.Appendable-java.nio.CharBuffer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copy</h4>
<pre>public static&nbsp;long&nbsp;copy(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang">Appendable</a>&nbsp;output,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/CharBuffer.html?is-external=true" title="class or interface in java.nio">CharBuffer</a>&nbsp;buffer)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Copies chars from a <code>Reader</code> to an <code>Appendable</code>.
<p>
This method uses the provided buffer, so there is no need to use a
<code>BufferedReader</code>.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reader</code> - the <code>Reader</code> to read from</dd>
<dd><code>output</code> - the <code>Appendable</code> to write to</dd>
<dd><code>buffer</code> - the buffer to be used for the copy</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of characters copied</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input or output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.7</dd>
</dl>
</li>
</ul>
<a name="copy-java.io.Reader-java.io.OutputStream-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copy</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static&nbsp;void&nbsp;copy(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#copy-java.io.Reader-java.io.OutputStream-java.nio.charset.Charset-"><code>copy(Reader, OutputStream, Charset)</code></a> instead</span></div>
<div class="block">Copies chars from a <code>Reader</code> to bytes on an
<code>OutputStream</code> using the default character encoding of the
platform, and calling flush.
<p>
This method buffers the input internally, so there is no need to use a
<code>BufferedReader</code>.
<p>
Due to the implementation of OutputStreamWriter, this method performs a
flush.
<p>
This method uses <a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStreamWriter.html?is-external=true" title="class or interface in java.io"><code>OutputStreamWriter</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reader</code> - the <code>Reader</code> to read from</dd>
<dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input or output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="copy-java.io.Reader-java.io.OutputStream-java.nio.charset.Charset-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copy</h4>
<pre>public static&nbsp;void&nbsp;copy(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;outputCharset)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Copies chars from a <code>Reader</code> to bytes on an
<code>OutputStream</code> using the specified character encoding, and
calling flush.
<p>
This method buffers the input internally, so there is no need to use a
<code>BufferedReader</code>.
</p>
<p>
Due to the implementation of OutputStreamWriter, this method performs a
flush.
</p>
<p>
This method uses <a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStreamWriter.html?is-external=true" title="class or interface in java.io"><code>OutputStreamWriter</code></a>.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reader</code> - the <code>Reader</code> to read from</dd>
<dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
<dd><code>outputCharset</code> - the charset to use for the OutputStream, null means platform default</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input or output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.3</dd>
</dl>
</li>
</ul>
<a name="copy-java.io.Reader-java.io.OutputStream-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copy</h4>
<pre>public static&nbsp;void&nbsp;copy(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;outputCharsetName)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Copies chars from a <code>Reader</code> to bytes on an
<code>OutputStream</code> using the specified character encoding, and
calling flush.
<p>
This method buffers the input internally, so there is no need to use a
<code>BufferedReader</code>.
<p>
Character encoding names can be found at
<a href="http://www.iana.org/assignments/character-sets">IANA</a>.
<p>
Due to the implementation of OutputStreamWriter, this method performs a
flush.
<p>
This method uses <a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStreamWriter.html?is-external=true" title="class or interface in java.io"><code>OutputStreamWriter</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reader</code> - the <code>Reader</code> to read from</dd>
<dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
<dd><code>outputCharsetName</code> - the name of the requested charset for the OutputStream, null means platform default</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input or output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - thrown instead of <a href="https://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html?is-external=true"><code>.UnsupportedEncodingException</code></a> in version 2.2 if the
encoding is not supported.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="copy-java.io.Reader-java.io.Writer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copy</h4>
<pre>public static&nbsp;int&nbsp;copy(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Copies chars from a <code>Reader</code> to a <code>Writer</code>.
<p>
This method buffers the input internally, so there is no need to use a
<code>BufferedReader</code>.
<p>
Large streams (over 2GB) will return a chars copied value of
<code>-1</code> after the copy has completed since the correct
number of chars cannot be returned as an int. For large streams
use the <code>copyLarge(Reader, Writer)</code> method.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reader</code> - the <code>Reader</code> to read.</dd>
<dd><code>writer</code> - the <code>Writer</code> to write.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of characters copied, or -1 if &gt; Integer.MAX_VALUE</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input or output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="copy-java.net.URL-java.io.File-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copy</h4>
<pre>public static&nbsp;long&nbsp;copy(<a href="https://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;url,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Copies bytes from a <code>URL</code> to an <code>OutputStream</code>.
<p>
This method buffers the input internally, so there is no need to use a <code>BufferedInputStream</code>.
</p>
<p>
The buffer size is given by <a href="../../../../org/apache/commons/io/IOUtils.html#DEFAULT_BUFFER_SIZE"><code>DEFAULT_BUFFER_SIZE</code></a>.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>url</code> - the <code>URL</code> to read.</dd>
<dd><code>file</code> - the <code>OutputStream</code> to write.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of bytes copied.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the URL is <code>null</code>.</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the OutputStream is <code>null</code>.</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.9.0</dd>
</dl>
</li>
</ul>
<a name="copy-java.net.URL-java.io.OutputStream-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copy</h4>
<pre>public static&nbsp;long&nbsp;copy(<a href="https://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;url,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;outputStream)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Copies bytes from a <code>URL</code> to an <code>OutputStream</code>.
<p>
This method buffers the input internally, so there is no need to use a <code>BufferedInputStream</code>.
</p>
<p>
The buffer size is given by <a href="../../../../org/apache/commons/io/IOUtils.html#DEFAULT_BUFFER_SIZE"><code>DEFAULT_BUFFER_SIZE</code></a>.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>url</code> - the <code>URL</code> to read.</dd>
<dd><code>outputStream</code> - the <code>OutputStream</code> to write.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of bytes copied.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the URL is <code>null</code>.</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the OutputStream is <code>null</code>.</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.9.0</dd>
</dl>
</li>
</ul>
<a name="copyLarge-java.io.InputStream-java.io.OutputStream-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copyLarge</h4>
<pre>public static&nbsp;long&nbsp;copyLarge(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;inputStream,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;outputStream)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Copies bytes from a large (over 2GB) <code>InputStream</code> to an
<code>OutputStream</code>.
<p>
This method buffers the input internally, so there is no need to use a
<code>BufferedInputStream</code>.
</p>
<p>
The buffer size is given by <a href="../../../../org/apache/commons/io/IOUtils.html#DEFAULT_BUFFER_SIZE"><code>DEFAULT_BUFFER_SIZE</code></a>.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>inputStream</code> - the <code>InputStream</code> to read.</dd>
<dd><code>outputStream</code> - the <code>OutputStream</code> to write.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of bytes copied.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the InputStream is <code>null</code>.</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the OutputStream is <code>null</code>.</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.3</dd>
</dl>
</li>
</ul>
<a name="copyLarge-java.io.InputStream-java.io.OutputStream-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copyLarge</h4>
<pre>public static&nbsp;long&nbsp;copyLarge(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;inputStream,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;outputStream,
byte[]&nbsp;buffer)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Copies bytes from a large (over 2GB) <code>InputStream</code> to an
<code>OutputStream</code>.
<p>
This method uses the provided buffer, so there is no need to use a
<code>BufferedInputStream</code>.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>inputStream</code> - the <code>InputStream</code> to read.</dd>
<dd><code>outputStream</code> - the <code>OutputStream</code> to write.</dd>
<dd><code>buffer</code> - the buffer to use for the copy</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of bytes copied.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the InputStream is <code>null</code>.</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the OutputStream is <code>null</code>.</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.2</dd>
</dl>
</li>
</ul>
<a name="copyLarge-java.io.InputStream-java.io.OutputStream-long-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copyLarge</h4>
<pre>public static&nbsp;long&nbsp;copyLarge(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
long&nbsp;inputOffset,
long&nbsp;length)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Copies some or all bytes from a large (over 2GB) <code>InputStream</code> to an
<code>OutputStream</code>, optionally skipping input bytes.
<p>
This method buffers the input internally, so there is no need to use a
<code>BufferedInputStream</code>.
</p>
<p>
Note that the implementation uses <a href="../../../../org/apache/commons/io/IOUtils.html#skip-java.io.InputStream-long-"><code>skip(InputStream, long)</code></a>.
This means that the method may be considerably less efficient than using the actual skip implementation,
this is done to guarantee that the correct number of characters are skipped.
</p>
The buffer size is given by <a href="../../../../org/apache/commons/io/IOUtils.html#DEFAULT_BUFFER_SIZE"><code>DEFAULT_BUFFER_SIZE</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - the <code>InputStream</code> to read from</dd>
<dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
<dd><code>inputOffset</code> - : number of bytes to skip from input before copying
-ve values are ignored</dd>
<dd><code>length</code> - : number of bytes to copy. -ve means all</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of bytes copied</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input or output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.2</dd>
</dl>
</li>
</ul>
<a name="copyLarge-java.io.InputStream-java.io.OutputStream-long-long-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copyLarge</h4>
<pre>public static&nbsp;long&nbsp;copyLarge(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
long&nbsp;inputOffset,
long&nbsp;length,
byte[]&nbsp;buffer)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Copies some or all bytes from a large (over 2GB) <code>InputStream</code> to an
<code>OutputStream</code>, optionally skipping input bytes.
<p>
This method uses the provided buffer, so there is no need to use a
<code>BufferedInputStream</code>.
</p>
<p>
Note that the implementation uses <a href="../../../../org/apache/commons/io/IOUtils.html#skip-java.io.InputStream-long-"><code>skip(InputStream, long)</code></a>.
This means that the method may be considerably less efficient than using the actual skip implementation,
this is done to guarantee that the correct number of characters are skipped.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - the <code>InputStream</code> to read from</dd>
<dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
<dd><code>inputOffset</code> - : number of bytes to skip from input before copying
-ve values are ignored</dd>
<dd><code>length</code> - : number of bytes to copy. -ve means all</dd>
<dd><code>buffer</code> - the buffer to use for the copy</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of bytes copied</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input or output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.2</dd>
</dl>
</li>
</ul>
<a name="copyLarge-java.io.Reader-java.io.Writer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copyLarge</h4>
<pre>public static&nbsp;long&nbsp;copyLarge(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Copies chars from a large (over 2GB) <code>Reader</code> to a <code>Writer</code>.
<p>
This method buffers the input internally, so there is no need to use a
<code>BufferedReader</code>.
<p>
The buffer size is given by <a href="../../../../org/apache/commons/io/IOUtils.html#DEFAULT_BUFFER_SIZE"><code>DEFAULT_BUFFER_SIZE</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reader</code> - the <code>Reader</code> to source.</dd>
<dd><code>writer</code> - the <code>Writer</code> to target.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of characters copied</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input or output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.3</dd>
</dl>
</li>
</ul>
<a name="copyLarge-java.io.Reader-java.io.Writer-char:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copyLarge</h4>
<pre>public static&nbsp;long&nbsp;copyLarge(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer,
char[]&nbsp;buffer)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Copies chars from a large (over 2GB) <code>Reader</code> to a <code>Writer</code>.
<p>
This method uses the provided buffer, so there is no need to use a
<code>BufferedReader</code>.
<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reader</code> - the <code>Reader</code> to source.</dd>
<dd><code>writer</code> - the <code>Writer</code> to target.</dd>
<dd><code>buffer</code> - the buffer to be used for the copy</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of characters copied</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input or output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.2</dd>
</dl>
</li>
</ul>
<a name="copyLarge-java.io.Reader-java.io.Writer-long-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copyLarge</h4>
<pre>public static&nbsp;long&nbsp;copyLarge(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer,
long&nbsp;inputOffset,
long&nbsp;length)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Copies some or all chars from a large (over 2GB) <code>InputStream</code> to an
<code>OutputStream</code>, optionally skipping input chars.
<p>
This method buffers the input internally, so there is no need to use a
<code>BufferedReader</code>.
<p>
The buffer size is given by <a href="../../../../org/apache/commons/io/IOUtils.html#DEFAULT_BUFFER_SIZE"><code>DEFAULT_BUFFER_SIZE</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reader</code> - the <code>Reader</code> to read from</dd>
<dd><code>writer</code> - the <code>Writer</code> to write to</dd>
<dd><code>inputOffset</code> - : number of chars to skip from input before copying
-ve values are ignored</dd>
<dd><code>length</code> - : number of chars to copy. -ve means all</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of chars copied</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input or output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.2</dd>
</dl>
</li>
</ul>
<a name="copyLarge-java.io.Reader-java.io.Writer-long-long-char:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copyLarge</h4>
<pre>public static&nbsp;long&nbsp;copyLarge(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer,
long&nbsp;inputOffset,
long&nbsp;length,
char[]&nbsp;buffer)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Copies some or all chars from a large (over 2GB) <code>InputStream</code> to an
<code>OutputStream</code>, optionally skipping input chars.
<p>
This method uses the provided buffer, so there is no need to use a
<code>BufferedReader</code>.
<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reader</code> - the <code>Reader</code> to read from</dd>
<dd><code>writer</code> - the <code>Writer</code> to write to</dd>
<dd><code>inputOffset</code> - : number of chars to skip from input before copying
-ve values are ignored</dd>
<dd><code>length</code> - : number of chars to copy. -ve means all</dd>
<dd><code>buffer</code> - the buffer to be used for the copy</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of chars copied</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input or output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.2</dd>
</dl>
</li>
</ul>
<a name="length-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>length</h4>
<pre>public static&nbsp;int&nbsp;length(byte[]&nbsp;array)</pre>
<div class="block">Returns the length of the given array in a null-safe manner.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>array</code> - an array or null</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the array length -- or 0 if the given array is null.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.7</dd>
</dl>
</li>
</ul>
<a name="length-char:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>length</h4>
<pre>public static&nbsp;int&nbsp;length(char[]&nbsp;array)</pre>
<div class="block">Returns the length of the given array in a null-safe manner.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>array</code> - an array or null</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the array length -- or 0 if the given array is null.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.7</dd>
</dl>
</li>
</ul>
<a name="length-java.lang.CharSequence-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>length</h4>
<pre>public static&nbsp;int&nbsp;length(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;csq)</pre>
<div class="block">Returns the length of the given CharSequence in a null-safe manner.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>csq</code> - a CharSequence or null</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the CharSequence length -- or 0 if the given CharSequence is null.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.7</dd>
</dl>
</li>
</ul>
<a name="length-java.lang.Object:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>length</h4>
<pre>public static&nbsp;int&nbsp;length(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>[]&nbsp;array)</pre>
<div class="block">Returns the length of the given array in a null-safe manner.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>array</code> - an array or null</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the array length -- or 0 if the given array is null.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.7</dd>
</dl>
</li>
</ul>
<a name="lineIterator-java.io.InputStream-java.nio.charset.Charset-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>lineIterator</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/commons/io/LineIterator.html" title="class in org.apache.commons.io">LineIterator</a>&nbsp;lineIterator(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset)</pre>
<div class="block">Returns an Iterator for the lines in an <code>InputStream</code>, using
the character encoding specified (or default encoding if null).
<p>
<code>LineIterator</code> holds a reference to the open
<code>InputStream</code> specified here. When you have finished with
the iterator you should close the stream to free internal resources.
This can be done by closing the stream directly, or by calling
<a href="../../../../org/apache/commons/io/LineIterator.html#close--"><code>LineIterator.close()</code></a> or <a href="../../../../org/apache/commons/io/LineIterator.html#closeQuietly-org.apache.commons.io.LineIterator-"><code>LineIterator.closeQuietly(LineIterator)</code></a>.
<p>
The recommended usage pattern is:
<pre>
try {
LineIterator it = IOUtils.lineIterator(stream, charset);
while (it.hasNext()) {
String line = it.nextLine();
/// do something with line
}
} finally {
IOUtils.closeQuietly(stream);
}
</pre></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - the <code>InputStream</code> to read from, not null</dd>
<dd><code>charset</code> - the charset to use, null means platform default</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an Iterator of the lines in the reader, never null</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the input is null</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.3</dd>
</dl>
</li>
</ul>
<a name="lineIterator-java.io.InputStream-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>lineIterator</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/commons/io/LineIterator.html" title="class in org.apache.commons.io">LineIterator</a>&nbsp;lineIterator(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charsetName)</pre>
<div class="block">Returns an Iterator for the lines in an <code>InputStream</code>, using
the character encoding specified (or default encoding if null).
<p>
<code>LineIterator</code> holds a reference to the open
<code>InputStream</code> specified here. When you have finished with
the iterator you should close the stream to free internal resources.
This can be done by closing the stream directly, or by calling
<a href="../../../../org/apache/commons/io/LineIterator.html#close--"><code>LineIterator.close()</code></a> or <a href="../../../../org/apache/commons/io/LineIterator.html#closeQuietly-org.apache.commons.io.LineIterator-"><code>LineIterator.closeQuietly(LineIterator)</code></a>.
<p>
The recommended usage pattern is:
<pre>
try {
LineIterator it = IOUtils.lineIterator(stream, "UTF-8");
while (it.hasNext()) {
String line = it.nextLine();
/// do something with line
}
} finally {
IOUtils.closeQuietly(stream);
}
</pre></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - the <code>InputStream</code> to read from, not null</dd>
<dd><code>charsetName</code> - the encoding to use, null means platform default</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an Iterator of the lines in the reader, never null</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the input is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - thrown instead of <a href="https://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html?is-external=true"><code>.UnsupportedEncodingException</code></a> in version 2.2 if the
encoding is not supported.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.2</dd>
</dl>
</li>
</ul>
<a name="lineIterator-java.io.Reader-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>lineIterator</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/commons/io/LineIterator.html" title="class in org.apache.commons.io">LineIterator</a>&nbsp;lineIterator(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader)</pre>
<div class="block">Returns an Iterator for the lines in a <code>Reader</code>.
<p>
<code>LineIterator</code> holds a reference to the open
<code>Reader</code> specified here. When you have finished with the
iterator you should close the reader to free internal resources.
This can be done by closing the reader directly, or by calling
<a href="../../../../org/apache/commons/io/LineIterator.html#close--"><code>LineIterator.close()</code></a> or <a href="../../../../org/apache/commons/io/LineIterator.html#closeQuietly-org.apache.commons.io.LineIterator-"><code>LineIterator.closeQuietly(LineIterator)</code></a>.
<p>
The recommended usage pattern is:
<pre>
try {
LineIterator it = IOUtils.lineIterator(reader);
while (it.hasNext()) {
String line = it.nextLine();
/// do something with line
}
} finally {
IOUtils.closeQuietly(reader);
}
</pre></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reader</code> - the <code>Reader</code> to read from, not null</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an Iterator of the lines in the reader, never null</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the reader is null</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.2</dd>
</dl>
</li>
</ul>
<a name="read-java.io.InputStream-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>read</h4>
<pre>public static&nbsp;int&nbsp;read(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
byte[]&nbsp;buffer)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Reads bytes from an input stream.
This implementation guarantees that it will read as many bytes
as possible before giving up; this may not always be the case for
subclasses of <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io"><code>InputStream</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - where to read input from</dd>
<dd><code>buffer</code> - destination</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>actual length read; may be less than requested if EOF was reached</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if a read error occurs</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.2</dd>
</dl>
</li>
</ul>
<a name="read-java.io.InputStream-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>read</h4>
<pre>public static&nbsp;int&nbsp;read(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
byte[]&nbsp;buffer,
int&nbsp;offset,
int&nbsp;length)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Reads bytes from an input stream.
This implementation guarantees that it will read as many bytes
as possible before giving up; this may not always be the case for
subclasses of <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io"><code>InputStream</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - where to read input from</dd>
<dd><code>buffer</code> - destination</dd>
<dd><code>offset</code> - initial offset into buffer</dd>
<dd><code>length</code> - length to read, must be &gt;= 0</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>actual length read; may be less than requested if EOF was reached</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if a read error occurs</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.2</dd>
</dl>
</li>
</ul>
<a name="read-java.nio.channels.ReadableByteChannel-java.nio.ByteBuffer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>read</h4>
<pre>public static&nbsp;int&nbsp;read(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/channels/ReadableByteChannel.html?is-external=true" title="class or interface in java.nio.channels">ReadableByteChannel</a>&nbsp;input,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;buffer)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Reads bytes from a ReadableByteChannel.
<p>
This implementation guarantees that it will read as many bytes
as possible before giving up; this may not always be the case for
subclasses of <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/channels/ReadableByteChannel.html?is-external=true" title="class or interface in java.nio.channels"><code>ReadableByteChannel</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - the byte channel to read</dd>
<dd><code>buffer</code> - byte buffer destination</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the actual length read; may be less than requested if EOF was reached</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if a read error occurs</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.5</dd>
</dl>
</li>
</ul>
<a name="read-java.io.Reader-char:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>read</h4>
<pre>public static&nbsp;int&nbsp;read(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
char[]&nbsp;buffer)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Reads characters from an input character stream.
This implementation guarantees that it will read as many characters
as possible before giving up; this may not always be the case for
subclasses of <a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io"><code>Reader</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reader</code> - where to read input from</dd>
<dd><code>buffer</code> - destination</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>actual length read; may be less than requested if EOF was reached</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if a read error occurs</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.2</dd>
</dl>
</li>
</ul>
<a name="read-java.io.Reader-char:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>read</h4>
<pre>public static&nbsp;int&nbsp;read(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
char[]&nbsp;buffer,
int&nbsp;offset,
int&nbsp;length)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Reads characters from an input character stream.
This implementation guarantees that it will read as many characters
as possible before giving up; this may not always be the case for
subclasses of <a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io"><code>Reader</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reader</code> - where to read input from</dd>
<dd><code>buffer</code> - destination</dd>
<dd><code>offset</code> - initial offset into buffer</dd>
<dd><code>length</code> - length to read, must be &gt;= 0</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>actual length read; may be less than requested if EOF was reached</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if a read error occurs</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.2</dd>
</dl>
</li>
</ul>
<a name="readFully-java.io.InputStream-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readFully</h4>
<pre>public static&nbsp;void&nbsp;readFully(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
byte[]&nbsp;buffer)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Reads the requested number of bytes or fail if there are not enough left.
<p>
This allows for the possibility that <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true#read-byte:A-int-int-" title="class or interface in java.io"><code>InputStream.read(byte[], int, int)</code></a> may
not read as many bytes as requested (most likely because of reaching EOF).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - where to read input from</dd>
<dd><code>buffer</code> - destination</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if there is a problem reading the file</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if length is negative</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/EOFException.html?is-external=true" title="class or interface in java.io">EOFException</a></code> - if the number of bytes read was incorrect</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.2</dd>
</dl>
</li>
</ul>
<a name="readFully-java.io.InputStream-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readFully</h4>
<pre>public static&nbsp;void&nbsp;readFully(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
byte[]&nbsp;buffer,
int&nbsp;offset,
int&nbsp;length)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Reads the requested number of bytes or fail if there are not enough left.
<p>
This allows for the possibility that <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true#read-byte:A-int-int-" title="class or interface in java.io"><code>InputStream.read(byte[], int, int)</code></a> may
not read as many bytes as requested (most likely because of reaching EOF).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - where to read input from</dd>
<dd><code>buffer</code> - destination</dd>
<dd><code>offset</code> - initial offset into buffer</dd>
<dd><code>length</code> - length to read, must be &gt;= 0</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if there is a problem reading the file</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if length is negative</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/EOFException.html?is-external=true" title="class or interface in java.io">EOFException</a></code> - if the number of bytes read was incorrect</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.2</dd>
</dl>
</li>
</ul>
<a name="readFully-java.io.InputStream-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readFully</h4>
<pre>public static&nbsp;byte[]&nbsp;readFully(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
int&nbsp;length)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Reads the requested number of bytes or fail if there are not enough left.
<p>
This allows for the possibility that <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true#read-byte:A-int-int-" title="class or interface in java.io"><code>InputStream.read(byte[], int, int)</code></a> may
not read as many bytes as requested (most likely because of reaching EOF).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - where to read input from</dd>
<dd><code>length</code> - length to read, must be &gt;= 0</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the bytes read from input</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if there is a problem reading the file</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if length is negative</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/EOFException.html?is-external=true" title="class or interface in java.io">EOFException</a></code> - if the number of bytes read was incorrect</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.5</dd>
</dl>
</li>
</ul>
<a name="readFully-java.nio.channels.ReadableByteChannel-java.nio.ByteBuffer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readFully</h4>
<pre>public static&nbsp;void&nbsp;readFully(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/channels/ReadableByteChannel.html?is-external=true" title="class or interface in java.nio.channels">ReadableByteChannel</a>&nbsp;input,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;buffer)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Reads the requested number of bytes or fail if there are not enough left.
<p>
This allows for the possibility that <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/channels/ReadableByteChannel.html?is-external=true#read-java.nio.ByteBuffer-" title="class or interface in java.nio.channels"><code>ReadableByteChannel.read(ByteBuffer)</code></a> may
not read as many bytes as requested (most likely because of reaching EOF).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - the byte channel to read</dd>
<dd><code>buffer</code> - byte buffer destination</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if there is a problem reading the file</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/EOFException.html?is-external=true" title="class or interface in java.io">EOFException</a></code> - if the number of bytes read was incorrect</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.5</dd>
</dl>
</li>
</ul>
<a name="readFully-java.io.Reader-char:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readFully</h4>
<pre>public static&nbsp;void&nbsp;readFully(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
char[]&nbsp;buffer)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Reads the requested number of characters or fail if there are not enough left.
<p>
This allows for the possibility that <a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true#read-char:A-int-int-" title="class or interface in java.io"><code>Reader.read(char[], int, int)</code></a> may
not read as many characters as requested (most likely because of reaching EOF).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reader</code> - where to read input from</dd>
<dd><code>buffer</code> - destination</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if there is a problem reading the file</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if length is negative</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/EOFException.html?is-external=true" title="class or interface in java.io">EOFException</a></code> - if the number of characters read was incorrect</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.2</dd>
</dl>
</li>
</ul>
<a name="readFully-java.io.Reader-char:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readFully</h4>
<pre>public static&nbsp;void&nbsp;readFully(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
char[]&nbsp;buffer,
int&nbsp;offset,
int&nbsp;length)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Reads the requested number of characters or fail if there are not enough left.
<p>
This allows for the possibility that <a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true#read-char:A-int-int-" title="class or interface in java.io"><code>Reader.read(char[], int, int)</code></a> may
not read as many characters as requested (most likely because of reaching EOF).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reader</code> - where to read input from</dd>
<dd><code>buffer</code> - destination</dd>
<dd><code>offset</code> - initial offset into buffer</dd>
<dd><code>length</code> - length to read, must be &gt;= 0</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if there is a problem reading the file</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if length is negative</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/EOFException.html?is-external=true" title="class or interface in java.io">EOFException</a></code> - if the number of characters read was incorrect</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.2</dd>
</dl>
</li>
</ul>
<a name="readLines-java.io.InputStream-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readLines</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;readLines(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#readLines-java.io.InputStream-java.nio.charset.Charset-"><code>readLines(InputStream, Charset)</code></a> instead</span></div>
<div class="block">Gets the contents of an <code>InputStream</code> as a list of Strings,
one entry per line, using the default character encoding of the platform.
<p>
This method buffers the input internally, so there is no need to use a
<code>BufferedInputStream</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - the <code>InputStream</code> to read from, not null</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the list of Strings, never null</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="readLines-java.io.InputStream-java.nio.charset.Charset-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readLines</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;readLines(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Gets the contents of an <code>InputStream</code> as a list of Strings,
one entry per line, using the specified character encoding.
<p>
This method buffers the input internally, so there is no need to use a
<code>BufferedInputStream</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - the <code>InputStream</code> to read from, not null</dd>
<dd><code>charset</code> - the charset to use, null means platform default</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the list of Strings, never null</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.3</dd>
</dl>
</li>
</ul>
<a name="readLines-java.io.InputStream-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readLines</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;readLines(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charsetName)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Gets the contents of an <code>InputStream</code> as a list of Strings,
one entry per line, using the specified character encoding.
<p>
Character encoding names can be found at
<a href="http://www.iana.org/assignments/character-sets">IANA</a>.
<p>
This method buffers the input internally, so there is no need to use a
<code>BufferedInputStream</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - the <code>InputStream</code> to read from, not null</dd>
<dd><code>charsetName</code> - the name of the requested charset, null means platform default</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the list of Strings, never null</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - thrown instead of <a href="https://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html?is-external=true"><code>.UnsupportedEncodingException</code></a> in version 2.2 if the
encoding is not supported.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="readLines-java.io.Reader-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readLines</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;readLines(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Gets the contents of a <code>Reader</code> as a list of Strings,
one entry per line.
<p>
This method buffers the input internally, so there is no need to use a
<code>BufferedReader</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reader</code> - the <code>Reader</code> to read from, not null</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the list of Strings, never null</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="resourceToByteArray-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>resourceToByteArray</h4>
<pre>public static&nbsp;byte[]&nbsp;resourceToByteArray(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Gets the contents of a classpath resource as a byte array.
<p>
It is expected the given <code>name</code> to be absolute. The
behavior is not well-defined otherwise.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - name of the desired resource</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the requested byte array</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/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.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.6</dd>
</dl>
</li>
</ul>
<a name="resourceToByteArray-java.lang.String-java.lang.ClassLoader-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>resourceToByteArray</h4>
<pre>public static&nbsp;byte[]&nbsp;resourceToByteArray(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang">ClassLoader</a>&nbsp;classLoader)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Gets the contents of a classpath resource as a byte array.
<p>
It is expected the given <code>name</code> to be absolute. The
behavior is not well-defined otherwise.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - name of the desired resource</dd>
<dd><code>classLoader</code> - the class loader that the resolution of the resource is delegated to</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the requested byte array</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/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.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.6</dd>
</dl>
</li>
</ul>
<a name="resourceToString-java.lang.String-java.nio.charset.Charset-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>resourceToString</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;resourceToString(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Gets the contents of a classpath resource as a String using the
specified character encoding.
<p>
It is expected the given <code>name</code> to be absolute. The
behavior is not well-defined otherwise.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - name of the desired resource</dd>
<dd><code>charset</code> - the charset to use, null means platform default</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the requested String</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/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.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.6</dd>
</dl>
</li>
</ul>
<a name="resourceToString-java.lang.String-java.nio.charset.Charset-java.lang.ClassLoader-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>resourceToString</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;resourceToString(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang">ClassLoader</a>&nbsp;classLoader)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Gets the contents of a classpath resource as a String using the
specified character encoding.
<p>
It is expected the given <code>name</code> to be absolute. The
behavior is not well-defined otherwise.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - name of the desired resource</dd>
<dd><code>charset</code> - the charset to use, null means platform default</dd>
<dd><code>classLoader</code> - the class loader that the resolution of the resource is delegated to</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the requested String</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/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.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.6</dd>
</dl>
</li>
</ul>
<a name="resourceToURL-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>resourceToURL</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;resourceToURL(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Gets a URL pointing to the given classpath resource.
<p>
It is expected the given <code>name</code> to be absolute. The
behavior is not well-defined otherwise.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - name of the desired resource</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the requested URL</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/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.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.6</dd>
</dl>
</li>
</ul>
<a name="resourceToURL-java.lang.String-java.lang.ClassLoader-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>resourceToURL</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;resourceToURL(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang">ClassLoader</a>&nbsp;classLoader)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Gets a URL pointing to the given classpath resource.
<p>
It is expected the given <code>name</code> to be absolute. The
behavior is not well-defined otherwise.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - name of the desired resource</dd>
<dd><code>classLoader</code> - the class loader that the resolution of the resource is delegated to</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the requested URL</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/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.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.6</dd>
</dl>
</li>
</ul>
<a name="skip-java.io.InputStream-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>skip</h4>
<pre>public static&nbsp;long&nbsp;skip(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
long&nbsp;toSkip)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Skips bytes from an input byte stream.
This implementation guarantees that it will read as many bytes
as possible before giving up; this may not always be the case for
skip() implementations in subclasses of <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io"><code>InputStream</code></a>.
<p>
Note that the implementation uses <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true#read-byte:A-int-int-" title="class or interface in java.io"><code>InputStream.read(byte[], int, int)</code></a> rather
than delegating to <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true#skip-long-" title="class or interface in java.io"><code>InputStream.skip(long)</code></a>.
This means that the method may be considerably less efficient than using the actual skip implementation,
this is done to guarantee that the correct number of bytes are skipped.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - byte stream to skip</dd>
<dd><code>toSkip</code> - number of bytes to skip.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>number of bytes actually skipped.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if there is a problem reading the file</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if toSkip is negative</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true#skip-long-" title="class or interface in java.io"><code>InputStream.skip(long)</code></a>,
<a href="https://issues.apache.org/jira/browse/IO-203">IO-203 - Add skipFully() method for InputStreams</a></dd>
</dl>
</li>
</ul>
<a name="skip-java.nio.channels.ReadableByteChannel-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>skip</h4>
<pre>public static&nbsp;long&nbsp;skip(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/channels/ReadableByteChannel.html?is-external=true" title="class or interface in java.nio.channels">ReadableByteChannel</a>&nbsp;input,
long&nbsp;toSkip)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Skips bytes from a ReadableByteChannel.
This implementation guarantees that it will read as many bytes
as possible before giving up.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - ReadableByteChannel to skip</dd>
<dd><code>toSkip</code> - number of bytes to skip.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>number of bytes actually skipped.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if there is a problem reading the ReadableByteChannel</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if toSkip is negative</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.5</dd>
</dl>
</li>
</ul>
<a name="skip-java.io.Reader-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>skip</h4>
<pre>public static&nbsp;long&nbsp;skip(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
long&nbsp;toSkip)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Skips characters from an input character stream.
This implementation guarantees that it will read as many characters
as possible before giving up; this may not always be the case for
skip() implementations in subclasses of <a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io"><code>Reader</code></a>.
<p>
Note that the implementation uses <a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true#read-char:A-int-int-" title="class or interface in java.io"><code>Reader.read(char[], int, int)</code></a> rather
than delegating to <a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true#skip-long-" title="class or interface in java.io"><code>Reader.skip(long)</code></a>.
This means that the method may be considerably less efficient than using the actual skip implementation,
this is done to guarantee that the correct number of characters are skipped.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reader</code> - character stream to skip</dd>
<dd><code>toSkip</code> - number of characters to skip.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>number of characters actually skipped.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if there is a problem reading the file</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if toSkip is negative</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true#skip-long-" title="class or interface in java.io"><code>Reader.skip(long)</code></a>,
<a href="https://issues.apache.org/jira/browse/IO-203">IO-203 - Add skipFully() method for InputStreams</a></dd>
</dl>
</li>
</ul>
<a name="skipFully-java.io.InputStream-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>skipFully</h4>
<pre>public static&nbsp;void&nbsp;skipFully(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
long&nbsp;toSkip)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Skips the requested number of bytes or fail if there are not enough left.
<p>
This allows for the possibility that <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true#skip-long-" title="class or interface in java.io"><code>InputStream.skip(long)</code></a> may
not skip as many bytes as requested (most likely because of reaching EOF).
<p>
Note that the implementation uses <a href="../../../../org/apache/commons/io/IOUtils.html#skip-java.io.InputStream-long-"><code>skip(InputStream, long)</code></a>.
This means that the method may be considerably less efficient than using the actual skip implementation,
this is done to guarantee that the correct number of characters are skipped.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - stream to skip</dd>
<dd><code>toSkip</code> - the number of bytes to skip</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if there is a problem reading the file</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if toSkip is negative</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/EOFException.html?is-external=true" title="class or interface in java.io">EOFException</a></code> - if the number of bytes skipped was incorrect</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true#skip-long-" title="class or interface in java.io"><code>InputStream.skip(long)</code></a></dd>
</dl>
</li>
</ul>
<a name="skipFully-java.nio.channels.ReadableByteChannel-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>skipFully</h4>
<pre>public static&nbsp;void&nbsp;skipFully(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/channels/ReadableByteChannel.html?is-external=true" title="class or interface in java.nio.channels">ReadableByteChannel</a>&nbsp;input,
long&nbsp;toSkip)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Skips the requested number of bytes or fail if there are not enough left.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - ReadableByteChannel to skip</dd>
<dd><code>toSkip</code> - the number of bytes to skip</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if there is a problem reading the ReadableByteChannel</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if toSkip is negative</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/EOFException.html?is-external=true" title="class or interface in java.io">EOFException</a></code> - if the number of bytes skipped was incorrect</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.5</dd>
</dl>
</li>
</ul>
<a name="skipFully-java.io.Reader-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>skipFully</h4>
<pre>public static&nbsp;void&nbsp;skipFully(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
long&nbsp;toSkip)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Skips the requested number of characters or fail if there are not enough left.
<p>
This allows for the possibility that <a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true#skip-long-" title="class or interface in java.io"><code>Reader.skip(long)</code></a> may
not skip as many characters as requested (most likely because of reaching EOF).
<p>
Note that the implementation uses <a href="../../../../org/apache/commons/io/IOUtils.html#skip-java.io.Reader-long-"><code>skip(Reader, long)</code></a>.
This means that the method may be considerably less efficient than using the actual skip implementation,
this is done to guarantee that the correct number of characters are skipped.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reader</code> - stream to skip</dd>
<dd><code>toSkip</code> - the number of characters to skip</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if there is a problem reading the file</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if toSkip is negative</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/EOFException.html?is-external=true" title="class or interface in java.io">EOFException</a></code> - if the number of characters skipped was incorrect</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true#skip-long-" title="class or interface in java.io"><code>Reader.skip(long)</code></a></dd>
</dl>
</li>
</ul>
<a name="toBufferedInputStream-java.io.InputStream-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toBufferedInputStream</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;toBufferedInputStream(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Fetches entire contents of an <code>InputStream</code> and represent
same data as result InputStream.
<p>
This method is useful where,
<ul>
<li>Source InputStream is slow.</li>
<li>It has network resources associated, so we cannot keep it open for
long time.</li>
<li>It has network timeout associated.</li>
</ul>
It can be used in favor of <a href="../../../../org/apache/commons/io/IOUtils.html#toByteArray-java.io.InputStream-"><code>toByteArray(InputStream)</code></a>, since it
avoids unnecessary allocation and copy of byte[].<br>
This method buffers the input internally, so there is no need to use a
<code>BufferedInputStream</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - Stream to be fully buffered.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A fully buffered stream.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/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.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.0</dd>
</dl>
</li>
</ul>
<a name="toBufferedInputStream-java.io.InputStream-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toBufferedInputStream</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;toBufferedInputStream(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
int&nbsp;size)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Fetches entire contents of an <code>InputStream</code> and represent
same data as result InputStream.
<p>
This method is useful where,
<ul>
<li>Source InputStream is slow.</li>
<li>It has network resources associated, so we cannot keep it open for
long time.</li>
<li>It has network timeout associated.</li>
</ul>
It can be used in favor of <a href="../../../../org/apache/commons/io/IOUtils.html#toByteArray-java.io.InputStream-"><code>toByteArray(InputStream)</code></a>, since it
avoids unnecessary allocation and copy of byte[].<br>
This method buffers the input internally, so there is no need to use a
<code>BufferedInputStream</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - Stream to be fully buffered.</dd>
<dd><code>size</code> - the initial buffer size</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A fully buffered stream.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/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.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.5</dd>
</dl>
</li>
</ul>
<a name="toBufferedReader-java.io.Reader-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toBufferedReader</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io">BufferedReader</a>&nbsp;toBufferedReader(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader)</pre>
<div class="block">Returns the given reader if it is a <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io"><code>BufferedReader</code></a>, otherwise creates a BufferedReader from the given
reader.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reader</code> - the reader to wrap or return (not null)</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the given reader or a new <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io"><code>BufferedReader</code></a> for the given reader</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input parameter is null</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.2</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/apache/commons/io/IOUtils.html#buffer-java.io.Reader-"><code>buffer(Reader)</code></a></dd>
</dl>
</li>
</ul>
<a name="toBufferedReader-java.io.Reader-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toBufferedReader</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io">BufferedReader</a>&nbsp;toBufferedReader(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
int&nbsp;size)</pre>
<div class="block">Returns the given reader if it is a <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io"><code>BufferedReader</code></a>, otherwise creates a BufferedReader from the given
reader.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reader</code> - the reader to wrap or return (not null)</dd>
<dd><code>size</code> - the buffer size, if a new BufferedReader is created.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the given reader or a new <a href="https://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io"><code>BufferedReader</code></a> for the given reader</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input parameter is null</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.5</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/apache/commons/io/IOUtils.html#buffer-java.io.Reader-"><code>buffer(Reader)</code></a></dd>
</dl>
</li>
</ul>
<a name="toByteArray-java.io.InputStream-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toByteArray</h4>
<pre>public static&nbsp;byte[]&nbsp;toByteArray(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;inputStream)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Gets the contents of an <code>InputStream</code> as a <code>byte[]</code>.
<p>
This method buffers the input internally, so there is no need to use a
<code>BufferedInputStream</code>.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>inputStream</code> - the <code>InputStream</code> to read.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the requested byte array.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the InputStream is <code>null</code>.</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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 or reading more than <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html?is-external=true#MAX_VALUE" title="class or interface in java.lang"><code>Integer.MAX_VALUE</code></a> occurs.</dd>
</dl>
</li>
</ul>
<a name="toByteArray-java.io.InputStream-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toByteArray</h4>
<pre>public static&nbsp;byte[]&nbsp;toByteArray(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
int&nbsp;size)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Gets the contents of an <code>InputStream</code> as a <code>byte[]</code>. Use this method instead of
<code>toByteArray(InputStream)</code> when <code>InputStream</code> size is known</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - the <code>InputStream</code> to read.</dd>
<dd><code>size</code> - the size of <code>InputStream</code>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the requested byte array.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/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 or <code>InputStream</code> size differ from parameter size.</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if size is less than zero.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.1</dd>
</dl>
</li>
</ul>
<a name="toByteArray-java.io.InputStream-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toByteArray</h4>
<pre>public static&nbsp;byte[]&nbsp;toByteArray(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
long&nbsp;size)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Gets contents of an <code>InputStream</code> as a <code>byte[]</code>.
Use this method instead of <code>toByteArray(InputStream)</code>
when <code>InputStream</code> size is known.
<b>NOTE:</b> the method checks that the length can safely be cast to an int without truncation
before using <a href="../../../../org/apache/commons/io/IOUtils.html#toByteArray-java.io.InputStream-int-"><code>toByteArray(java.io.InputStream, int)</code></a> to read into the byte array.
(Arrays can have no more than Integer.MAX_VALUE entries anyway)</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - the <code>InputStream</code> to read from</dd>
<dd><code>size</code> - the size of <code>InputStream</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the requested byte array</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/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 or <code>InputStream</code> size differ from parameter
size</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if size is less than zero or size is greater than Integer.MAX_VALUE</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.1</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/apache/commons/io/IOUtils.html#toByteArray-java.io.InputStream-int-"><code>toByteArray(java.io.InputStream, int)</code></a></dd>
</dl>
</li>
</ul>
<a name="toByteArray-java.io.Reader-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toByteArray</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static&nbsp;byte[]&nbsp;toByteArray(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#toByteArray-java.io.Reader-java.nio.charset.Charset-"><code>toByteArray(Reader, Charset)</code></a> instead</span></div>
<div class="block">Gets the contents of a <code>Reader</code> as a <code>byte[]</code>
using the default character encoding of the platform.
<p>
This method buffers the input internally, so there is no need to use a
<code>BufferedReader</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reader</code> - the <code>Reader</code> to read from</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the requested byte array</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
</dl>
</li>
</ul>
<a name="toByteArray-java.io.Reader-java.nio.charset.Charset-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toByteArray</h4>
<pre>public static&nbsp;byte[]&nbsp;toByteArray(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Gets the contents of a <code>Reader</code> as a <code>byte[]</code>
using the specified character encoding.
<p>
This method buffers the input internally, so there is no need to use a
<code>BufferedReader</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reader</code> - the <code>Reader</code> to read from</dd>
<dd><code>charset</code> - the charset to use, null means platform default</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the requested byte array</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.3</dd>
</dl>
</li>
</ul>
<a name="toByteArray-java.io.Reader-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toByteArray</h4>
<pre>public static&nbsp;byte[]&nbsp;toByteArray(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charsetName)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Gets the contents of a <code>Reader</code> as a <code>byte[]</code>
using the specified character encoding.
<p>
Character encoding names can be found at
<a href="http://www.iana.org/assignments/character-sets">IANA</a>.
<p>
This method buffers the input internally, so there is no need to use a
<code>BufferedReader</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reader</code> - the <code>Reader</code> to read from</dd>
<dd><code>charsetName</code> - the name of the requested charset, null means platform default</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the requested byte array</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - thrown instead of <a href="https://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html?is-external=true"><code>.UnsupportedEncodingException</code></a> in version 2.2 if the
encoding is not supported.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="toByteArray-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toByteArray</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static&nbsp;byte[]&nbsp;toByteArray(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;input)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 Use <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes--" title="class or interface in java.lang"><code>String.getBytes()</code></a> instead</span></div>
<div class="block">Gets the contents of a <code>String</code> as a <code>byte[]</code>
using the default character encoding of the platform.
<p>
This is the same as <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes--" title="class or interface in java.lang"><code>String.getBytes()</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - the <code>String</code> to convert</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the requested byte array</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
</dl>
</li>
</ul>
<a name="toByteArray-java.net.URI-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toByteArray</h4>
<pre>public static&nbsp;byte[]&nbsp;toByteArray(<a href="https://docs.oracle.com/javase/7/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</a>&nbsp;uri)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Gets the contents of a <code>URI</code> as a <code>byte[]</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - the <code>URI</code> to read</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the requested byte array</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the uri is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O exception occurs</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.4</dd>
</dl>
</li>
</ul>
<a name="toByteArray-java.net.URL-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toByteArray</h4>
<pre>public static&nbsp;byte[]&nbsp;toByteArray(<a href="https://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;url)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Gets the contents of a <code>URL</code> as a <code>byte[]</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>url</code> - the <code>URL</code> to read</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the requested byte array</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O exception occurs</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.4</dd>
</dl>
</li>
</ul>
<a name="toByteArray-java.net.URLConnection-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toByteArray</h4>
<pre>public static&nbsp;byte[]&nbsp;toByteArray(<a href="https://docs.oracle.com/javase/7/docs/api/java/net/URLConnection.html?is-external=true" title="class or interface in java.net">URLConnection</a>&nbsp;urlConn)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Gets the contents of a <code>URLConnection</code> as a <code>byte[]</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>urlConn</code> - the <code>URLConnection</code> to read.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the requested byte array.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the urlConn is null.</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O exception occurs.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.4</dd>
</dl>
</li>
</ul>
<a name="toCharArray-java.io.InputStream-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toCharArray</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static&nbsp;char[]&nbsp;toCharArray(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;inputStream)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#toCharArray-java.io.InputStream-java.nio.charset.Charset-"><code>toCharArray(InputStream, Charset)</code></a> instead</span></div>
<div class="block">Gets the contents of an <code>InputStream</code> as a character array
using the default character encoding of the platform.
<p>
This method buffers the input internally, so there is no need to use a
<code>BufferedInputStream</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>inputStream</code> - the <code>InputStream</code> to read from</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the requested character array</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="toCharArray-java.io.InputStream-java.nio.charset.Charset-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toCharArray</h4>
<pre>public static&nbsp;char[]&nbsp;toCharArray(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;inputStream,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Gets the contents of an <code>InputStream</code> as a character array
using the specified character encoding.
<p>
This method buffers the input internally, so there is no need to use a
<code>BufferedInputStream</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>inputStream</code> - the <code>InputStream</code> to read from</dd>
<dd><code>charset</code> - the charset to use, null means platform default</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the requested character array</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.3</dd>
</dl>
</li>
</ul>
<a name="toCharArray-java.io.InputStream-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toCharArray</h4>
<pre>public static&nbsp;char[]&nbsp;toCharArray(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;inputStream,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charsetName)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Gets the contents of an <code>InputStream</code> as a character array
using the specified character encoding.
<p>
Character encoding names can be found at
<a href="http://www.iana.org/assignments/character-sets">IANA</a>.
<p>
This method buffers the input internally, so there is no need to use a
<code>BufferedInputStream</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>inputStream</code> - the <code>InputStream</code> to read from</dd>
<dd><code>charsetName</code> - the name of the requested charset, null means platform default</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the requested character array</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - thrown instead of <a href="https://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html?is-external=true"><code>.UnsupportedEncodingException</code></a> in version 2.2 if the
encoding is not supported.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="toCharArray-java.io.Reader-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toCharArray</h4>
<pre>public static&nbsp;char[]&nbsp;toCharArray(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Gets the contents of a <code>Reader</code> as a character array.
<p>
This method buffers the input internally, so there is no need to use a
<code>BufferedReader</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reader</code> - the <code>Reader</code> to read from</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the requested character array</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="toInputStream-java.lang.CharSequence-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toInputStream</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;toInputStream(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;input)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#toInputStream-java.lang.CharSequence-java.nio.charset.Charset-"><code>toInputStream(CharSequence, Charset)</code></a> instead</span></div>
<div class="block">Converts the specified CharSequence to an input stream, encoded as bytes
using the default character encoding of the platform.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - the CharSequence to convert</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an input stream</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.0</dd>
</dl>
</li>
</ul>
<a name="toInputStream-java.lang.CharSequence-java.nio.charset.Charset-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toInputStream</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;toInputStream(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;input,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset)</pre>
<div class="block">Converts the specified CharSequence to an input stream, encoded as bytes
using the specified character encoding.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - the CharSequence to convert</dd>
<dd><code>charset</code> - the charset to use, null means platform default</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an input stream</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.3</dd>
</dl>
</li>
</ul>
<a name="toInputStream-java.lang.CharSequence-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toInputStream</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;toInputStream(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;input,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charsetName)</pre>
<div class="block">Converts the specified CharSequence to an input stream, encoded as bytes
using the specified character encoding.
<p>
Character encoding names can be found at
<a href="http://www.iana.org/assignments/character-sets">IANA</a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - the CharSequence to convert</dd>
<dd><code>charsetName</code> - the name of the requested charset, null means platform default</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an input stream</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - thrown instead of <a href="https://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html?is-external=true"><code>.UnsupportedEncodingException</code></a> in version 2.2 if the
encoding is not supported.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.0</dd>
</dl>
</li>
</ul>
<a name="toInputStream-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toInputStream</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;toInputStream(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;input)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#toInputStream-java.lang.String-java.nio.charset.Charset-"><code>toInputStream(String, Charset)</code></a> instead</span></div>
<div class="block">Converts the specified string to an input stream, encoded as bytes
using the default character encoding of the platform.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - the string to convert</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an input stream</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="toInputStream-java.lang.String-java.nio.charset.Charset-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toInputStream</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;toInputStream(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;input,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset)</pre>
<div class="block">Converts the specified string to an input stream, encoded as bytes
using the specified character encoding.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - the string to convert</dd>
<dd><code>charset</code> - the charset to use, null means platform default</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an input stream</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.3</dd>
</dl>
</li>
</ul>
<a name="toInputStream-java.lang.String-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toInputStream</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;toInputStream(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;input,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charsetName)</pre>
<div class="block">Converts the specified string to an input stream, encoded as bytes
using the specified character encoding.
<p>
Character encoding names can be found at
<a href="http://www.iana.org/assignments/character-sets">IANA</a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - the string to convert</dd>
<dd><code>charsetName</code> - the name of the requested charset, null means platform default</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an input stream</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - thrown instead of <a href="https://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html?is-external=true"><code>.UnsupportedEncodingException</code></a> in version 2.2 if the
encoding is not supported.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="toString-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString(byte[]&nbsp;input)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 Use <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#String-byte:A-" title="class or interface in java.lang"><code>String(byte[])</code></a> instead</span></div>
<div class="block">Gets the contents of a <code>byte[]</code> as a String
using the default character encoding of the platform.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - the byte array to read from</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the requested String</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
</dl>
</li>
</ul>
<a name="toString-byte:A-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString(byte[]&nbsp;input,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charsetName)</pre>
<div class="block">Gets the contents of a <code>byte[]</code> as a String
using the specified character encoding.
<p>
Character encoding names can be found at
<a href="http://www.iana.org/assignments/character-sets">IANA</a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - the byte array to read from</dd>
<dd><code>charsetName</code> - the name of the requested charset, null means platform default</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the requested String</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
</dl>
</li>
</ul>
<a name="toString-java.io.InputStream-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#toString-java.io.InputStream-java.nio.charset.Charset-"><code>toString(InputStream, Charset)</code></a> instead</span></div>
<div class="block">Gets the contents of an <code>InputStream</code> as a String
using the default character encoding of the platform.
<p>
This method buffers the input internally, so there is no need to use a
<code>BufferedInputStream</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - the <code>InputStream</code> to read from</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the requested String</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
</dl>
</li>
</ul>
<a name="toString-java.io.InputStream-java.nio.charset.Charset-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Gets the contents of an <code>InputStream</code> as a String
using the specified character encoding.
<p>
This method buffers the input internally, so there is no need to use a
<code>BufferedInputStream</code>.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - the <code>InputStream</code> to read from</dd>
<dd><code>charset</code> - the charset to use, null means platform default</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the requested String</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.3</dd>
</dl>
</li>
</ul>
<a name="toString-java.io.InputStream-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charsetName)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Gets the contents of an <code>InputStream</code> as a String
using the specified character encoding.
<p>
Character encoding names can be found at
<a href="http://www.iana.org/assignments/character-sets">IANA</a>.
<p>
This method buffers the input internally, so there is no need to use a
<code>BufferedInputStream</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - the <code>InputStream</code> to read from</dd>
<dd><code>charsetName</code> - the name of the requested charset, null means platform default</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the requested String</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - thrown instead of <a href="https://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html?is-external=true"><code>.UnsupportedEncodingException</code></a> in version 2.2 if the
encoding is not supported.</dd>
</dl>
</li>
</ul>
<a name="toString-java.io.Reader-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Gets the contents of a <code>Reader</code> as a String.
<p>
This method buffers the input internally, so there is no need to use a
<code>BufferedReader</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reader</code> - the <code>Reader</code> to read from</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the requested String</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
</dl>
</li>
</ul>
<a name="toString-java.net.URI-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString(<a href="https://docs.oracle.com/javase/7/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</a>&nbsp;uri)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#toString-java.net.URI-java.nio.charset.Charset-"><code>toString(URI, Charset)</code></a> instead</span></div>
<div class="block">Gets the contents at the given URI.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - The URI source.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The contents of the URL as a String.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O exception occurs.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.1</dd>
</dl>
</li>
</ul>
<a name="toString-java.net.URI-java.nio.charset.Charset-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString(<a href="https://docs.oracle.com/javase/7/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</a>&nbsp;uri,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Gets the contents at the given URI.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - The URI source.</dd>
<dd><code>encoding</code> - The encoding name for the URL contents.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The contents of the URL as a String.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O exception occurs.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.3.</dd>
</dl>
</li>
</ul>
<a name="toString-java.net.URI-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString(<a href="https://docs.oracle.com/javase/7/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</a>&nbsp;uri,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charsetName)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Gets the contents at the given URI.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - The URI source.</dd>
<dd><code>charsetName</code> - The encoding name for the URL contents.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The contents of the URL as a String.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O exception occurs.</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - thrown instead of <a href="https://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html?is-external=true"><code>.UnsupportedEncodingException</code></a> in version 2.2 if the
encoding is not supported.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.1</dd>
</dl>
</li>
</ul>
<a name="toString-java.net.URL-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString(<a href="https://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;url)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#toString-java.net.URL-java.nio.charset.Charset-"><code>toString(URL, Charset)</code></a> instead</span></div>
<div class="block">Gets the contents at the given URL.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>url</code> - The URL source.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The contents of the URL as a String.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O exception occurs.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.1</dd>
</dl>
</li>
</ul>
<a name="toString-java.net.URL-java.nio.charset.Charset-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString(<a href="https://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;url,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Gets the contents at the given URL.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>url</code> - The URL source.</dd>
<dd><code>encoding</code> - The encoding name for the URL contents.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The contents of the URL as a String.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O exception occurs.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.3</dd>
</dl>
</li>
</ul>
<a name="toString-java.net.URL-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString(<a href="https://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;url,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charsetName)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Gets the contents at the given URL.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>url</code> - The URL source.</dd>
<dd><code>charsetName</code> - The encoding name for the URL contents.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The contents of the URL as a String.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O exception occurs.</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - thrown instead of <a href="https://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html?is-external=true"><code>.UnsupportedEncodingException</code></a> in version 2.2 if the
encoding is not supported.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.1</dd>
</dl>
</li>
</ul>
<a name="write-byte:A-java.io.OutputStream-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre>public static&nbsp;void&nbsp;write(byte[]&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Writes bytes from a <code>byte[]</code> to an <code>OutputStream</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - the byte array to write, do not modify during output,
null ignored</dd>
<dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="write-byte:A-java.io.Writer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static&nbsp;void&nbsp;write(byte[]&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#write-byte:A-java.io.Writer-java.nio.charset.Charset-"><code>write(byte[], Writer, Charset)</code></a> instead</span></div>
<div class="block">Writes bytes from a <code>byte[]</code> to chars on a <code>Writer</code>
using the default character encoding of the platform.
<p>
This method uses <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#String-byte:A-" title="class or interface in java.lang"><code>String(byte[])</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - the byte array to write, do not modify during output,
null ignored</dd>
<dd><code>writer</code> - the <code>Writer</code> to write to</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="write-byte:A-java.io.Writer-java.nio.charset.Charset-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre>public static&nbsp;void&nbsp;write(byte[]&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Writes bytes from a <code>byte[]</code> to chars on a <code>Writer</code>
using the specified character encoding.
<p>
This method uses <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#String-byte:A-java.lang.String-" title="class or interface in java.lang"><code>String(byte[], String)</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - the byte array to write, do not modify during output,
null ignored</dd>
<dd><code>writer</code> - the <code>Writer</code> to write to</dd>
<dd><code>charset</code> - the charset to use, null means platform default</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.3</dd>
</dl>
</li>
</ul>
<a name="write-byte:A-java.io.Writer-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre>public static&nbsp;void&nbsp;write(byte[]&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charsetName)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Writes bytes from a <code>byte[]</code> to chars on a <code>Writer</code>
using the specified character encoding.
<p>
Character encoding names can be found at
<a href="http://www.iana.org/assignments/character-sets">IANA</a>.
<p>
This method uses <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#String-byte:A-java.lang.String-" title="class or interface in java.lang"><code>String(byte[], String)</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - the byte array to write, do not modify during output,
null ignored</dd>
<dd><code>writer</code> - the <code>Writer</code> to write to</dd>
<dd><code>charsetName</code> - the name of the requested charset, null means platform default</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - thrown instead of <a href="https://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html?is-external=true"><code>.UnsupportedEncodingException</code></a> in version 2.2 if the
encoding is not supported.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="write-char:A-java.io.OutputStream-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static&nbsp;void&nbsp;write(char[]&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#write-char:A-java.io.OutputStream-java.nio.charset.Charset-"><code>write(char[], OutputStream, Charset)</code></a> instead</span></div>
<div class="block">Writes chars from a <code>char[]</code> to bytes on an
<code>OutputStream</code>.
<p>
This method uses <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#String-char:A-" title="class or interface in java.lang"><code>String(char[])</code></a> and
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes--" title="class or interface in java.lang"><code>String.getBytes()</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - the char array to write, do not modify during output,
null ignored</dd>
<dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="write-char:A-java.io.OutputStream-java.nio.charset.Charset-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre>public static&nbsp;void&nbsp;write(char[]&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Writes chars from a <code>char[]</code> to bytes on an
<code>OutputStream</code> using the specified character encoding.
<p>
This method uses <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#String-char:A-" title="class or interface in java.lang"><code>String(char[])</code></a> and
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes-java.lang.String-" title="class or interface in java.lang"><code>String.getBytes(String)</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - the char array to write, do not modify during output,
null ignored</dd>
<dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
<dd><code>charset</code> - the charset to use, null means platform default</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.3</dd>
</dl>
</li>
</ul>
<a name="write-char:A-java.io.OutputStream-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre>public static&nbsp;void&nbsp;write(char[]&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charsetName)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Writes chars from a <code>char[]</code> to bytes on an
<code>OutputStream</code> using the specified character encoding.
<p>
Character encoding names can be found at
<a href="http://www.iana.org/assignments/character-sets">IANA</a>.
<p>
This method uses <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#String-char:A-" title="class or interface in java.lang"><code>String(char[])</code></a> and
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes-java.lang.String-" title="class or interface in java.lang"><code>String.getBytes(String)</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - the char array to write, do not modify during output,
null ignored</dd>
<dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
<dd><code>charsetName</code> - the name of the requested charset, null means platform default</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - thrown instead of <a href="https://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html?is-external=true"><code>.UnsupportedEncodingException</code></a> in version 2.2 if the encoding is not supported.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="write-char:A-java.io.Writer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre>public static&nbsp;void&nbsp;write(char[]&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Writes chars from a <code>char[]</code> to a <code>Writer</code></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - the char array to write, do not modify during output,
null ignored</dd>
<dd><code>writer</code> - the <code>Writer</code> to write to</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="write-java.lang.CharSequence-java.io.OutputStream-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static&nbsp;void&nbsp;write(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#write-java.lang.CharSequence-java.io.OutputStream-java.nio.charset.Charset-"><code>write(CharSequence, OutputStream, Charset)</code></a> instead</span></div>
<div class="block">Writes chars from a <code>CharSequence</code> to bytes on an
<code>OutputStream</code> using the default character encoding of the
platform.
<p>
This method uses <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes--" title="class or interface in java.lang"><code>String.getBytes()</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - the <code>CharSequence</code> to write, null ignored</dd>
<dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.0</dd>
</dl>
</li>
</ul>
<a name="write-java.lang.CharSequence-java.io.OutputStream-java.nio.charset.Charset-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre>public static&nbsp;void&nbsp;write(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Writes chars from a <code>CharSequence</code> to bytes on an
<code>OutputStream</code> using the specified character encoding.
<p>
This method uses <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes-java.lang.String-" title="class or interface in java.lang"><code>String.getBytes(String)</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - the <code>CharSequence</code> to write, null ignored</dd>
<dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
<dd><code>charset</code> - the charset to use, null means platform default</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.3</dd>
</dl>
</li>
</ul>
<a name="write-java.lang.CharSequence-java.io.OutputStream-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre>public static&nbsp;void&nbsp;write(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charsetName)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Writes chars from a <code>CharSequence</code> to bytes on an
<code>OutputStream</code> using the specified character encoding.
<p>
Character encoding names can be found at
<a href="http://www.iana.org/assignments/character-sets">IANA</a>.
<p>
This method uses <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes-java.lang.String-" title="class or interface in java.lang"><code>String.getBytes(String)</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - the <code>CharSequence</code> to write, null ignored</dd>
<dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
<dd><code>charsetName</code> - the name of the requested charset, null means platform default</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - thrown instead of <a href="https://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html?is-external=true"><code>.UnsupportedEncodingException</code></a> in version 2.2 if the encoding is not supported.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.0</dd>
</dl>
</li>
</ul>
<a name="write-java.lang.CharSequence-java.io.Writer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre>public static&nbsp;void&nbsp;write(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Writes chars from a <code>CharSequence</code> to a <code>Writer</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - the <code>CharSequence</code> to write, null ignored</dd>
<dd><code>writer</code> - the <code>Writer</code> to write to</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.0</dd>
</dl>
</li>
</ul>
<a name="write-java.lang.String-java.io.OutputStream-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static&nbsp;void&nbsp;write(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#write-java.lang.String-java.io.OutputStream-java.nio.charset.Charset-"><code>write(String, OutputStream, Charset)</code></a> instead</span></div>
<div class="block">Writes chars from a <code>String</code> to bytes on an
<code>OutputStream</code> using the default character encoding of the
platform.
<p>
This method uses <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes--" title="class or interface in java.lang"><code>String.getBytes()</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - the <code>String</code> to write, null ignored</dd>
<dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="write-java.lang.String-java.io.OutputStream-java.nio.charset.Charset-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre>public static&nbsp;void&nbsp;write(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Writes chars from a <code>String</code> to bytes on an
<code>OutputStream</code> using the specified character encoding.
<p>
This method uses <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes-java.lang.String-" title="class or interface in java.lang"><code>String.getBytes(String)</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - the <code>String</code> to write, null ignored</dd>
<dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
<dd><code>charset</code> - the charset to use, null means platform default</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.3</dd>
</dl>
</li>
</ul>
<a name="write-java.lang.String-java.io.OutputStream-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre>public static&nbsp;void&nbsp;write(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charsetName)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Writes chars from a <code>String</code> to bytes on an
<code>OutputStream</code> using the specified character encoding.
<p>
Character encoding names can be found at
<a href="http://www.iana.org/assignments/character-sets">IANA</a>.
<p>
This method uses <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes-java.lang.String-" title="class or interface in java.lang"><code>String.getBytes(String)</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - the <code>String</code> to write, null ignored</dd>
<dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
<dd><code>charsetName</code> - the name of the requested charset, null means platform default</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - thrown instead of <a href="https://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html?is-external=true"><code>.UnsupportedEncodingException</code></a> in version 2.2 if the encoding is not supported.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="write-java.lang.String-java.io.Writer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre>public static&nbsp;void&nbsp;write(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Writes chars from a <code>String</code> to a <code>Writer</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - the <code>String</code> to write, null ignored</dd>
<dd><code>writer</code> - the <code>Writer</code> to write to</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="write-java.lang.StringBuffer-java.io.OutputStream-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static&nbsp;void&nbsp;write(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/StringBuffer.html?is-external=true" title="class or interface in java.lang">StringBuffer</a>&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">replaced by write(CharSequence, OutputStream)</span></div>
<div class="block">Writes chars from a <code>StringBuffer</code> to bytes on an
<code>OutputStream</code> using the default character encoding of the
platform.
<p>
This method uses <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes--" title="class or interface in java.lang"><code>String.getBytes()</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - the <code>StringBuffer</code> to write, null ignored</dd>
<dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="write-java.lang.StringBuffer-java.io.OutputStream-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static&nbsp;void&nbsp;write(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/StringBuffer.html?is-external=true" title="class or interface in java.lang">StringBuffer</a>&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charsetName)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">replaced by write(CharSequence, OutputStream, String)</span></div>
<div class="block">Writes chars from a <code>StringBuffer</code> to bytes on an
<code>OutputStream</code> using the specified character encoding.
<p>
Character encoding names can be found at
<a href="http://www.iana.org/assignments/character-sets">IANA</a>.
<p>
This method uses <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes-java.lang.String-" title="class or interface in java.lang"><code>String.getBytes(String)</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - the <code>StringBuffer</code> to write, null ignored</dd>
<dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
<dd><code>charsetName</code> - the name of the requested charset, null means platform default</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - thrown instead of <a href="https://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html?is-external=true"><code>.UnsupportedEncodingException</code></a> in version 2.2 if the encoding is not supported.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="write-java.lang.StringBuffer-java.io.Writer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static&nbsp;void&nbsp;write(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/StringBuffer.html?is-external=true" title="class or interface in java.lang">StringBuffer</a>&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">replaced by write(CharSequence, Writer)</span></div>
<div class="block">Writes chars from a <code>StringBuffer</code> to a <code>Writer</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - the <code>StringBuffer</code> to write, null ignored</dd>
<dd><code>writer</code> - the <code>Writer</code> to write to</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="writeChunked-byte:A-java.io.OutputStream-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeChunked</h4>
<pre>public static&nbsp;void&nbsp;writeChunked(byte[]&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Writes bytes from a <code>byte[]</code> to an <code>OutputStream</code> using chunked writes.
This is intended for writing very large byte arrays which might otherwise cause excessive
memory usage if the native code has to allocate a copy.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - the byte array to write, do not modify during output,
null ignored</dd>
<dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.5</dd>
</dl>
</li>
</ul>
<a name="writeChunked-char:A-java.io.Writer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeChunked</h4>
<pre>public static&nbsp;void&nbsp;writeChunked(char[]&nbsp;data,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Writes chars from a <code>char[]</code> to a <code>Writer</code> using chunked writes.
This is intended for writing very large byte arrays which might otherwise cause excessive
memory usage if the native code has to allocate a copy.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - the char array to write, do not modify during output,
null ignored</dd>
<dd><code>writer</code> - the <code>Writer</code> to write to</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.5</dd>
</dl>
</li>
</ul>
<a name="writeLines-java.util.Collection-java.lang.String-java.io.OutputStream-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeLines</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static&nbsp;void&nbsp;writeLines(<a href="https://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;lines,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;lineEnding,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#writeLines-java.util.Collection-java.lang.String-java.io.OutputStream-java.nio.charset.Charset-"><code>writeLines(Collection, String, OutputStream, Charset)</code></a> instead</span></div>
<div class="block">Writes the <code>toString()</code> value of each item in a collection to
an <code>OutputStream</code> line by line, using the default character
encoding of the platform and the specified line ending.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>lines</code> - the lines to write, null entries produce blank lines</dd>
<dd><code>lineEnding</code> - the line separator to use, null is system default</dd>
<dd><code>output</code> - the <code>OutputStream</code> to write to, not null, not closed</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="writeLines-java.util.Collection-java.lang.String-java.io.OutputStream-java.nio.charset.Charset-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeLines</h4>
<pre>public static&nbsp;void&nbsp;writeLines(<a href="https://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;lines,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;lineEnding,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Writes the <code>toString()</code> value of each item in a collection to
an <code>OutputStream</code> line by line, using the specified character
encoding and the specified line ending.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>lines</code> - the lines to write, null entries produce blank lines</dd>
<dd><code>lineEnding</code> - the line separator to use, null is system default</dd>
<dd><code>output</code> - the <code>OutputStream</code> to write to, not null, not closed</dd>
<dd><code>charset</code> - the charset to use, null means platform default</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.3</dd>
</dl>
</li>
</ul>
<a name="writeLines-java.util.Collection-java.lang.String-java.io.OutputStream-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeLines</h4>
<pre>public static&nbsp;void&nbsp;writeLines(<a href="https://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;lines,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;lineEnding,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charsetName)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Writes the <code>toString()</code> value of each item in a collection to
an <code>OutputStream</code> line by line, using the specified character
encoding and the specified line ending.
<p>
Character encoding names can be found at
<a href="http://www.iana.org/assignments/character-sets">IANA</a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>lines</code> - the lines to write, null entries produce blank lines</dd>
<dd><code>lineEnding</code> - the line separator to use, null is system default</dd>
<dd><code>output</code> - the <code>OutputStream</code> to write to, not null, not closed</dd>
<dd><code>charsetName</code> - the name of the requested charset, null means platform default</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the output is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - thrown instead of <a href="https://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html?is-external=true"><code>.UnsupportedEncodingException</code></a> in version 2.2 if the
encoding is not supported.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="writeLines-java.util.Collection-java.lang.String-java.io.Writer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeLines</h4>
<pre>public static&nbsp;void&nbsp;writeLines(<a href="https://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;lines,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;lineEnding,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Writes the <code>toString()</code> value of each item in a collection to
a <code>Writer</code> line by line, using the specified line ending.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>lines</code> - the lines to write, null entries produce blank lines</dd>
<dd><code>lineEnding</code> - the line separator to use, null is system default</dd>
<dd><code>writer</code> - the <code>Writer</code> to write to, not null, not closed</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/7/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</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="writer-java.lang.Appendable-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>writer</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang">Appendable</a>&nbsp;appendable)</pre>
<div class="block">Returns the given Appendable if it is already a <a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io"><code>Writer</code></a>, otherwise creates a Writer wrapper around the
given Appendable.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>appendable</code> - the Appendable to wrap or return (not null)</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the given Appendable or a Writer wrapper around the given Appendable</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input parameter is null</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.7</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/IOUtils.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/commons/io/IOIndexedException.html" title="class in org.apache.commons.io"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/commons/io/LineIterator.html" title="class in org.apache.commons.io"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/commons/io/IOUtils.html" target="_top">Frames</a></li>
<li><a href="IOUtils.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2002&#x2013;2021 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>