<commit_before><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <title>Package Documentation for org.apache.avalon.excalibur.io Package</title>
</head>
   <body bgcolor="white">
     Utility code for IO operations.     <br>
<span style="font-style: italic;">NOTE: Some classes are not yet included
in this description</span><br>
<br>
     <a name="doc.Description"></a>     
<div align="center">       <a href="#doc.Intro">[Introduction]</a>      
<a href="#doc.IOUtils">[IO Utilities]</a>       <a href="#doc.FileUtil">[File
Utilities]</a>       <a href="#doc.Endian">[Endian Utilities]</a>     </div>
      <a name="doc.Intro"></a>     
<h2>Introduction</h2>
     
<p>The <code>org.apache.commons.io</code> package contains utility code for
file- and stream-based IO operation. 
    </p>


        <a name="doc.IOUtils"></a>     
<h2>The <a href="IOUtils.html">org.apache.commons.io.IOUtils</a> class</h2>
     
<p>     The <a href="IOUtils.html">IOUtils</a> class contains a     comprehensive
set of static methods for copying from:     </p>
<ul>
       <li><code>String</code></li>
       <li><code>byte[]</code></li>
       <li><code>InputStream</code></li>
       <li><code>Reader</code></li>
     
</ul>
     To:     
<ul>
       <li><code>String</code></li>
       <li><code>byte[]</code></li>
       <li><code>OutputStream</code></li>
       <li><code>Writer</code></li>
     
</ul>
     
<p></p>
      
<p>As an example, consider the task of reading bytes from a URL, and printing
them. This would     typically done like this:</p>
     
<pre>import java.net.URL;<br>import java.io.*;<br><br>public class ManualCopy {<br>  public static void main(String args[]) throws IOException {<br>    InputStream in = new URL( "http://jakarta.apache.org" ).openStream();<br>    <font
 color="blue">
      InputStreamReader inR = new InputStreamReader( in );
    BufferedReader buf = new BufferedReader( inR );
    String line;
    while ( ( line = buf.readLine() ) != null )
    {
      System.out.println( line );
    }
    </font>
      in.close();
  }
}
   </pre>
     
<p>With the IOUtils class, that could be done with:</p>
     
<pre>import java.net.URL;<br>import java.io.*;<br>import org.apache.commons.io.IOUtils;<br><br>public class IOUtilsCopy {<br>  public static void main(String args[]) throws IOException {<br>    InputStream in = new URL( "http://jakarta.apache.org" ).openStream();<br>    <font
 color="blue">System.out.println( IOUtils.toString( in ) );</font>
      in.close();
  }   
}
    </pre>
     
<p>In certain application domains, such IO operations are common, and this
class can save a     great deal of time.</p>
     
<p>For utility code such as this, flexibility and speed are of primary importance.
In IOUtils,     each kind of copy method has a variant which allows the buffer
size to be set. For methods that     convert bytes to chars, the encoding
method may also be set.</p>
       <a name="doc.FileUtil"></a>     
<h2>The <a href="FileUtil.html">org.apache.commons.io.FileUtil</a> class</h2>
      
<p>The <a href="FileUtil.html">FileUtil</a> class contains     methods for
retrieving different components of a file path (directory name, file base
name, file     extension), methods for copying Files to other files and directories,
and methods for deleting     and cleaning directories. For more information,
see the <a href="FileUtil.html">class       description</a>     </p>
       <a name="doc.Endian"></a>     
<h2>The Endian classes</h2>
       
<p>Different computer architectures adopt different conventions for byte
ordering. In so-called     "Little Endian" architectures (eg Intel), the
low-order byte is stored in memory at the lowest     address, and subsequent
bytes at higher addresses. For "Big Endian" architectures (eg Motorola), 
   the situation is reversed.</p>
     
<p>There are two classes in this package of relevance:     </p>
<ul>
       <li>The <a href="EndianUtil.html">org.apache.commons.io.EndianUtil</a>
class       contains static methods for swapping the Endian-ness of Java
primitives and streams.</li>
       <li>The       <a href="SwappedDataInputStream.html">org.apache.avalon.excalibur.io.SwappedDataInputStream</a> 
      class is an implementation of the {@link java.io.DataInput} interface.
With this, one can read       data from files of non-native Endian-ness.</li>
     <commit_msg>fixed FileUtils name in the javadoc<commit_after><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <title>Package Documentation for org.apache.avalon.excalibur.io Package</title>
</head>
   <body bgcolor="white">
     Utility code for IO operations.     <br>
<span style="font-style: italic;">NOTE: Some classes are not yet included
in this description</span><br>
<br>
     <a name="doc.Description"></a>     
<div align="center">       <a href="#doc.Intro">[Introduction]</a>      
<a href="#doc.IOUtils">[IO Utilities]</a>       <a href="#doc.FileUtils">[File
Utilities]</a>       <a href="#doc.Endian">[Endian Utilities]</a>     </div>
      <a name="doc.Intro"></a>     
<h2>Introduction</h2>
     
<p>The <code>org.apache.commons.io</code> package contains utility code for
file- and stream-based IO operation. 
    </p>


        <a name="doc.IOUtils"></a>     
<h2>The <a href="IOUtils.html">org.apache.commons.io.IOUtils</a> class</h2>
     
<p>     The <a href="IOUtils.html">IOUtils</a> class contains a     comprehensive
set of static methods for copying from:     </p>
<ul>
       <li><code>String</code></li>
       <li><code>byte[]</code></li>
       <li><code>InputStream</code></li>
       <li><code>Reader</code></li>
     
</ul>
     To:     
<ul>
       <li><code>String</code></li>
       <li><code>byte[]</code></li>
       <li><code>OutputStream</code></li>
       <li><code>Writer</code></li>
     
</ul>
     
<p></p>
      
<p>As an example, consider the task of reading bytes from a URL, and printing
them. This would     typically done like this:</p>
     
<pre>import java.net.URL;<br>import java.io.*;<br><br>public class ManualCopy {<br>  public static void main(String args[]) throws IOException {<br>    InputStream in = new URL( "http://jakarta.apache.org" ).openStream();<br>    <font
 color="blue">
      InputStreamReader inR = new InputStreamReader( in );
    BufferedReader buf = new BufferedReader( inR );
    String line;
    while ( ( line = buf.readLine() ) != null )
    {
      System.out.println( line );
    }
    </font>
      in.close();
  }
}
   </pre>
     
<p>With the IOUtils class, that could be done with:</p>
     
<pre>import java.net.URL;<br>import java.io.*;<br>import org.apache.commons.io.IOUtils;<br><br>public class IOUtilsCopy {<br>  public static void main(String args[]) throws IOException {<br>    InputStream in = new URL( "http://jakarta.apache.org" ).openStream();<br>    <font
 color="blue">System.out.println( IOUtils.toString( in ) );</font>
      in.close();
  }   
}
    </pre>
     
<p>In certain application domains, such IO operations are common, and this
class can save a     great deal of time.</p>
     
<p>For utility code such as this, flexibility and speed are of primary importance.
In IOUtils,     each kind of copy method has a variant which allows the buffer
size to be set. For methods that     convert bytes to chars, the encoding
method may also be set.</p>
       <a name="doc.FileUtils"></a>     
<h2>The <a href="FileUtils.html">org.apache.commons.io.FileUtils</a> class</h2>
      
<p>The <a href="FileUtils.html">FileUtils</a> class contains     methods for
retrieving different components of a file path (directory name, file base
name, file     extension), methods for copying Files to other files and directories,
and methods for deleting     and cleaning directories. For more information,
see the <a href="FileUtils.html">class       description</a>     </p>
       <a name="doc.Endian"></a>     
<h2>The Endian classes</h2>
       
<p>Different computer architectures adopt different conventions for byte
ordering. In so-called     "Little Endian" architectures (eg Intel), the
low-order byte is stored in memory at the lowest     address, and subsequent
bytes at higher addresses. For "Big Endian" architectures (eg Motorola), 
   the situation is reversed.</p>
     
<p>There are two classes in this package of relevance:     </p>
<ul>
       <li>The <a href="EndianUtil.html">org.apache.commons.io.EndianUtil</a>
class       contains static methods for swapping the Endian-ness of Java
primitives and streams.</li>
       <li>The       <a href="SwappedDataInputStream.html">org.apache.avalon.excalibur.io.SwappedDataInputStream</a> 
      class is an implementation of the {@link java.io.DataInput} interface.
With this, one can read       data from files of non-native Endian-ness.</li>
     
{'fraction_non_alphanumeric': 0.14390934844192635, 'fraction_numerical': 0.0027195467422096316, 'mean_word_length': 3.194866920152091, 'pattern_counts': {'":': 0, '<': 279, '<?xml version=': 0, '>': 279, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4430519', 'n_tokens_mistral': 2812, 'n_tokens_neox': 2781, 'n_words': 843}