Skip to content

Commit 3006d14

Browse files
author
Stephen Colebourne
committed
Rework package javadoc for v1.1
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/io/trunk@290001 13f79535-47bb-0310-9956-ffa450edef68
1 parent 990ea5d commit 3006d14

4 files changed

Lines changed: 108 additions & 121 deletions

File tree

src/java/org/apache/commons/io/filefilter/package.html

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
1+
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2+
<!--
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.
16+
-->
117
<html>
2-
<body>
18+
<body>
319
<p>This package defines an interface (IOFileFilter) that combines both
420
{@link java.io.FileFilter} and {@link java.io.FilenameFilter}. Besides
521
that the package offers a series of ready-to-use implementations of the
@@ -24,11 +40,14 @@
2440
<td><a href="SuffixFileFilter.html">SuffixFileFilter</a></td>
2541
<td>Filter based on a suffix</td>
2642
</tr>
27-
<tr>
43+
<tr>
2844
<td><a href="NameFileFilter.html">NameFileFilter</a></td>
2945
<td>Filter based on a filename</td>
3046
</tr>
31-
47+
<tr>
48+
<td><a href="WildcardFileFilter.html">WildcardFileFilter</a></td>
49+
<td>Filter based on wildcards</td>
50+
</tr>
3251
</tbody>
3352
</table>
3453

@@ -87,7 +106,7 @@
87106

88107
<p>This package also contains a utility class:
89108
<a href="FileFilterUtils.html">FileFilterUtils</a>. It allows you to use all
90-
file filters without having to put the in the import section. Here's how the
109+
file filters without having to put them in the import section. Here's how the
91110
above example will look using FileFilterUtils:</p>
92111
<pre>
93112
File dir = new File(".");

src/java/org/apache/commons/io/input/package.html

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
1+
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2+
<!--
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.
16+
-->
117
<html>
2-
<body>
3-
Implementations of input classes, such as
4-
<code>InputStream</code> and
5-
<code>Reader</code>.
6-
</body>
18+
<body>
19+
<p>
20+
This package provides implementations of input classes, such as
21+
<code>InputStream</code> and <code>Reader</code>.
22+
</p>
23+
</body>
724
</html>
8-

src/java/org/apache/commons/io/output/package.html

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
1+
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2+
<!--
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.
16+
-->
117
<html>
2-
<body>
3-
Implementations of output classes, such as
4-
<code>OutputStream</code> and
5-
<code>Writer</code>.
6-
</body>
18+
<body>
19+
<p>
20+
This package provides implementations of output classes, such as
21+
<code>OutputStream</code> and <code>Writer</code>.
22+
</p>
23+
</body>
724
</html>
8-
Lines changed: 41 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -1,110 +1,46 @@
11
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2-
<html>
3-
<head>
4-
<title>Package Documentation for org.apache.avalon.excalibur.io Package</title>
5-
</head>
6-
<body bgcolor="white">
7-
Utility code for IO operations. <br>
8-
<span style="font-style: italic;">NOTE: Some classes are not yet included
9-
in this description</span><br>
10-
<br>
11-
<a name="doc.Description"></a>
12-
<div align="center"> <a href="#doc.Intro">[Introduction]</a>
13-
<a href="#doc.IOUtils">[IO Utilities]</a> <a href="#doc.FileUtils">[File
14-
Utilities]</a> <a href="#doc.Endian">[Endian Utilities]</a> </div>
15-
<a name="doc.Intro"></a>
16-
<h2>Introduction</h2>
17-
18-
<p>The <code>org.apache.commons.io</code> package contains utility code for
19-
file- and stream-based IO operation.
20-
</p>
2+
<!--
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
218
9+
http://www.apache.org/licenses/LICENSE-2.0
2210
23-
<a name="doc.IOUtils"></a>
24-
<h2>The <a href="IOUtils.html">org.apache.commons.io.IOUtils</a> class</h2>
25-
26-
<p> The <a href="IOUtils.html">IOUtils</a> class contains a comprehensive
27-
set of static methods for copying from: </p>
28-
<ul>
29-
<li><code>String</code></li>
30-
<li><code>byte[]</code></li>
31-
<li><code>InputStream</code></li>
32-
<li><code>Reader</code></li>
33-
34-
</ul>
35-
To:
36-
<ul>
37-
<li><code>String</code></li>
38-
<li><code>byte[]</code></li>
39-
<li><code>OutputStream</code></li>
40-
<li><code>Writer</code></li>
41-
42-
</ul>
43-
44-
<p></p>
45-
46-
<p>As an example, consider the task of reading bytes from a URL, and printing
47-
them. This would typically done like this:</p>
48-
49-
<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>
50-
<b>InputStreamReader inR = new InputStreamReader( in );
51-
BufferedReader buf = new BufferedReader( inR );
52-
String line;
53-
while ( ( line = buf.readLine() ) != null )
54-
{
55-
System.out.println( line );
56-
}</b>
57-
in.close();
58-
}
59-
}
60-
</pre>
61-
62-
<p>With the IOUtils class, that could be done with:</p>
63-
64-
<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>
65-
<b>System.out.println( IOUtils.toString( in ) );</b>
66-
in.close();
67-
}
68-
}
69-
</pre>
70-
71-
<p>In certain application domains, such IO operations are common, and this
72-
class can save a great deal of time.</p>
73-
74-
<p>For utility code such as this, flexibility and speed are of primary importance.
75-
In IOUtils, each kind of copy method has a variant which allows the buffer
76-
size to be set. For methods that convert bytes to chars, the encoding
77-
method may also be set.</p>
78-
<a name="doc.FileUtils"></a>
79-
<h2>The <a href="FileUtils.html">org.apache.commons.io.FileUtils</a> class</h2>
80-
81-
<p>The <a href="FileUtils.html">FileUtils</a> class contains methods for
82-
retrieving different components of a file path (directory name, file base
83-
name, file extension), methods for copying Files to other files and directories,
84-
and methods for deleting and cleaning directories. For more information,
85-
see the <a href="FileUtils.html">class description</a> </p>
86-
<a name="doc.Endian"></a>
87-
<h2>The Endian classes</h2>
88-
89-
<p>Different computer architectures adopt different conventions for byte
90-
ordering. In so-called "Little Endian" architectures (eg Intel), the
91-
low-order byte is stored in memory at the lowest address, and subsequent
92-
bytes at higher addresses. For "Big Endian" architectures (eg Motorola),
93-
the situation is reversed.</p>
94-
95-
<p>There are two classes in this package of relevance: </p>
96-
<ul>
97-
<li>The <a href="EndianUtil.html">org.apache.commons.io.EndianUtil</a>
98-
class contains static methods for swapping the Endian-ness of Java
99-
primitives and streams.</li>
100-
<li>The <a href="input/SwappedDataInputStream.html">org.apache.commons.io.input.SwappedDataInputStream</a>
101-
class is an implementation of the {@link java.io.DataInput} interface.
102-
With this, one can read data from files of non-native Endian-ness.</li>
103-
104-
</ul>
105-
106-
<p>For more information, see <a
107-
href="http://www.cs.umass.edu/%7Everts/cs32/endian.html">http://www.cs.umass.edu/~verts/cs32/endian.html</a>. </p>
108-
<br>
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.
16+
-->
17+
<html>
18+
<body bgcolor="white">
19+
<p>
20+
This package defines utility classes for working with streams, readers,
21+
writers and files. The most commonly used classes are described here:
22+
</p>
23+
<p>
24+
<b>IOUtils</b> is the most frequently used class.
25+
It provides operations to read, write, copy and close streams.
26+
</p>
27+
<p>
28+
<b>FileUtils</b> provides operations based around the JDK File class.
29+
These include reading, writing, copying, comparing and deleting.
30+
</p>
31+
<p>
32+
<b>FilenameUtils</b> provides utilities based on filenames.
33+
This utility class manipulates filenames without using File objects.
34+
It aims to simplify the transition between Windows and Unix.
35+
Before using this class however, you should consider whether you should
36+
be using File objects.
37+
</p>
38+
<p>
39+
<b>FileSystemUtils</b> allows access to the filing system in ways the JDK
40+
does not support. At present this allows you to get the free space on a drive.
41+
</p>
42+
<p>
43+
<b>EndianUtils</b> swaps data between Big-Endian and Little-Endian formats.
44+
</p>
10945
</body>
11046
</html>

0 commit comments

Comments
 (0)