|
1 | 1 | <?xml version="1.0"?> |
2 | | - |
3 | 2 | <!-- |
4 | | - Main index |
5 | | - $Id$ |
| 3 | +Copyright 2002-2005 The Apache Software Foundation. |
| 4 | + |
| 5 | +Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | +you may not use this file except in compliance with the License. |
| 7 | +You may obtain a copy of the License at |
| 8 | +
|
| 9 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +
|
| 11 | +Unless required by applicable law or agreed to in writing, software |
| 12 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | +See the License for the specific iouage governing permissions and |
| 15 | +limitations under the License. |
6 | 16 | --> |
7 | | - |
8 | 17 | <document> |
9 | 18 | <properties> |
10 | | - <title>About Commons IO</title> |
11 | | - <author email="commons-dev@jakarta.apache.org">Commons Documentation Team</author> |
12 | | - </properties> |
| 19 | + <title>User guide</title> |
| 20 | + <author email="commons-dev@jakarta.apache.org">Commons Documentation Team</author> |
| 21 | + </properties> |
13 | 22 | <body> |
14 | 23 |
|
15 | 24 | <section name="Commons IO"> |
|
26 | 35 | </section> |
27 | 36 |
|
28 | 37 | <section name="Utility classes"> |
29 | | - <subsection name="CopyUtils and IOUtils"> |
30 | | - <p> |
31 | | - <code>org.apache.commons.io.CopyUtils</code> |
32 | | - contains a comprehensive set of static methods for copying |
33 | | - from String, byte[], InputStream, Reader |
34 | | - to OutputStream, Writer. |
35 | | - </p> |
| 38 | + <subsection name="IOUtils"> |
36 | 39 | <p> |
37 | 40 | <code>org.apache.commons.io.IOUtils</code> |
38 | | - contains additional IO-related tools for safely closing streams |
39 | | - and creating Strings and byte arrays from streams and Readers. |
| 41 | + contains utility methods dealing with reading, writing and copying. |
| 42 | + The methods work on InputStream, OutputStream, Reader and Writer. |
40 | 43 | </p> |
41 | | - |
42 | 44 | <p> |
43 | 45 | As an example, consider the task of reading bytes |
44 | 46 | from a URL, and printing them. This would typically done like this: |
|
83 | 85 |
|
84 | 86 | <subsection name="FileUtils"> |
85 | 87 | <p> |
86 | | - The <code>org.apache.commons.io.FileUtils</code> |
87 | | - class contains methods for retrieving different components of a file path |
88 | | - (directory name, file base name, file extension), methods |
89 | | - for copying files to other files and directories, and methods |
90 | | - for querying, deleting and cleaning directories. For more information, |
91 | | - see the class description. |
| 88 | + The <code>org.apache.commons.io.FileUtils</code> class contains |
| 89 | + utility methods for working with File objects. |
| 90 | + These include reading, writing, copying and comparing files. |
| 91 | + </p> |
| 92 | + </subsection> |
| 93 | + |
| 94 | + <subsection name="FilenameUtils"> |
| 95 | + <p> |
| 96 | + The <code>org.apache.commons.io.FilenameUtils</code> class contains |
| 97 | + utility methods for working with filenames <i>without</i> |
| 98 | + using File objects. The class aims to be consistent |
| 99 | + between Unix and Windows, to aid transitions between these |
| 100 | + environments (such as moving from development to production). |
| 101 | + </p> |
| 102 | + </subsection> |
| 103 | + |
| 104 | + <subsection name="FileSystemUtils"> |
| 105 | + <p> |
| 106 | + The <code>org.apache.commons.io.FileSystemUtils</code> class contains |
| 107 | + utility methods for working with the file system |
| 108 | + to access functionality not supported by the JDK. |
| 109 | + Currently, the only method is to get the free space on a drive. |
| 110 | + Note that this uses the command line, not native code. |
92 | 111 | </p> |
93 | 112 | </subsection> |
94 | 113 |
|
|
0 commit comments