Skip to content

Commit 724d798

Browse files
author
Niall Pemberton
committed
@SInCE Commons IO 2.0 tags
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/io/trunk@1003647 13f79535-47bb-0310-9956-ffa450edef68
1 parent 45e7ddd commit 724d798

18 files changed

Lines changed: 37 additions & 16 deletions

src/java/org/apache/commons/io/DirectoryWalker.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,7 @@ protected void handleDirectoryStart(File directory, int depth, Collection<T> res
514514
* @param files the files (possibly filtered) in the directory
515515
* @return the filtered list of files
516516
* @throws IOException if an I/O Error occurs
517+
* @since Commons IO 2.0
517518
*/
518519
protected File[] filterDirectoryContents(File directory, int depth, File[] files) throws IOException {
519520
return files;

src/java/org/apache/commons/io/FileSystemUtils.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ public static long freeSpaceKb(String path, long timeout) throws IOException {
216216
* @return the amount of free drive space on the drive or volume in kilobytes
217217
* @throws IllegalStateException if an error occurred in initialisation
218218
* @throws IOException if an error occurs when finding the free space
219+
* @since Commons IO 2.0
219220
*/
220221
public static long freeSpaceKb() throws IOException {
221222
return freeSpaceKb(-1);

src/java/org/apache/commons/io/FileUtils.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1495,7 +1495,7 @@ public static void writeStringToFile(File file, String data) throws IOException
14951495
* @param file the file to write
14961496
* @param data the content to write to the file
14971497
* @throws IOException in case of an I/O error
1498-
* @since IO 2.0
1498+
* @since Commons IO 2.0
14991499
*/
15001500
public static void write(File file, CharSequence data) throws IOException {
15011501
String str = data == null ? null : data.toString();
@@ -1510,7 +1510,7 @@ public static void write(File file, CharSequence data) throws IOException {
15101510
* @param encoding the encoding to use, <code>null</code> means platform default
15111511
* @throws IOException in case of an I/O error
15121512
* @throws java.io.UnsupportedEncodingException if the encoding is not supported by the VM
1513-
* @since IO 2.0
1513+
* @since Commons IO 2.0
15141514
*/
15151515
public static void write(File file, CharSequence data, String encoding) throws IOException {
15161516
String str = data == null ? null : data.toString();
@@ -2184,7 +2184,7 @@ public static void moveToDirectory(File src, File destDir, boolean createDestDir
21842184
* @param file the file to check
21852185
* @return true if the file is a Symbolic Link
21862186
* @throws IOException if an IO error occurs while checking the file
2187-
* @since IO 2.0
2187+
* @since Commons IO 2.0
21882188
*/
21892189
public static boolean isSymlink(File file) throws IOException {
21902190
if (file == null) {

src/java/org/apache/commons/io/FilenameUtils.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,9 @@ public static String normalize(String filename) {
242242
*
243243
* @param filename the filename to normalize, null returns null
244244
* @param unixSeparator <code>true</code> if a unix separator should
245-
* be used or <code>false</code> if a windows separtor should be used.
245+
* be used or <code>false</code> if a windows separator should be used.
246246
* @return the normalized filename, or null if invalid
247+
* @since Commons IO 2.0
247248
*/
248249
public static String normalize(String filename, boolean unixSeparator) {
249250
char separator = (unixSeparator ? UNIX_SEPARATOR : WINDOWS_SEPARATOR);
@@ -337,6 +338,7 @@ public static String normalizeNoEndSeparator(String filename) {
337338
* @param unixSeparator <code>true</code> if a unix separator should
338339
* be used or <code>false</code> if a windows separtor should be used.
339340
* @return the normalized filename, or null if invalid
341+
* @since Commons IO 2.0
340342
*/
341343
public static String normalizeNoEndSeparator(String filename, boolean unixSeparator) {
342344
char separator = (unixSeparator ? UNIX_SEPARATOR : WINDOWS_SEPARATOR);

src/java/org/apache/commons/io/IOCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ public boolean checkEndsWith(String str, String end) {
213213
* @return the first index of the search String,
214214
* -1 if no match or <code>null</code> string input
215215
* @throws NullPointerException if either string is null
216-
* @since 2.0
216+
* @since Commons IO 2.0
217217
*/
218218
public int checkIndexOf(String str, int strStartIndex, String search) {
219219
int endIndex = str.length() - search.length();

src/java/org/apache/commons/io/IOUtils.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ public static void closeQuietly(Reader input) {
194194
* </pre>
195195
*
196196
* @param channel the Channel to close, may be null or already closed
197+
* @since Commons IO 2.0
197198
*/
198199
public static void closeQuietly(Channel channel) {
199200
closeQuietly((Closeable)channel);
@@ -333,6 +334,7 @@ public static void closeQuietly(Closeable closeable) {
333334
* </pre>
334335
*
335336
* @param sock the Socket to close, may be null or already closed
337+
* @since Commons IO 2.0
336338
*/
337339
public static void closeQuietly(Socket sock){
338340
if (sock != null){
@@ -760,7 +762,7 @@ public static LineIterator lineIterator(InputStream input, String encoding)
760762
*
761763
* @param input the CharSequence to convert
762764
* @return an input stream
763-
* @since IO 2.0
765+
* @since Commons IO 2.0
764766
*/
765767
public static InputStream toInputStream(CharSequence input) {
766768
return toInputStream(input.toString());
@@ -777,7 +779,7 @@ public static InputStream toInputStream(CharSequence input) {
777779
* @param encoding the encoding to use, null means platform default
778780
* @throws IOException if the encoding is invalid
779781
* @return an input stream
780-
* @since IO 2.0
782+
* @since Commons IO 2.0
781783
*/
782784
public static InputStream toInputStream(CharSequence input, String encoding) throws IOException {
783785
return toInputStream(input.toString(), encoding);
@@ -1548,6 +1550,7 @@ public static boolean contentEquals(Reader input1, Reader input2)
15481550
*
15491551
* @throws IOException if there is a problem reading the file
15501552
* @throws IllegalArgumentException if toSkip is negative
1553+
* @since Commons IO 2.0
15511554
*/
15521555
public static long skip(InputStream input, long toSkip) throws IOException {
15531556
if (toSkip < 0) {
@@ -1588,6 +1591,7 @@ public static long skip(InputStream input, long toSkip) throws IOException {
15881591
*
15891592
* @throws IOException if there is a problem reading the file
15901593
* @throws IllegalArgumentException if toSkip is negative
1594+
* @since Commons IO 2.0
15911595
*/
15921596
public static long skip(Reader input, long toSkip) throws IOException {
15931597
if (toSkip < 0) {
@@ -1627,6 +1631,7 @@ public static long skip(Reader input, long toSkip) throws IOException {
16271631
* @throws IOException if there is a problem reading the file
16281632
* @throws IllegalArgumentException if toSkip is negative
16291633
* @throws EOFException if the number of bytes skipped was incorrect
1634+
* @since Commons IO 2.0
16301635
*/
16311636
public static void skipFully(InputStream input, long toSkip) throws IOException {
16321637
if (toSkip < 0){
@@ -1651,6 +1656,7 @@ public static void skipFully(InputStream input, long toSkip) throws IOException
16511656
* @throws IOException if there is a problem reading the file
16521657
* @throws IllegalArgumentException if toSkip is negative
16531658
* @throws EOFException if the number of characters skipped was incorrect
1659+
* @since Commons IO 2.0
16541660
*/
16551661
public static void skipFully(Reader input, long toSkip) throws IOException {
16561662
long skipped = skip(input, toSkip);

src/java/org/apache/commons/io/comparator/AbstractFileComparator.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ abstract class AbstractFileComparator implements Comparator<File> {
3838
*
3939
* @param files The files to sort, may be null
4040
* @return The sorted array
41+
* @since Commons IO 2.0
4142
*/
4243
public File[] sort(File... files) {
4344
if (files != null) {
@@ -54,6 +55,7 @@ public File[] sort(File... files) {
5455
*
5556
* @param files The files to sort, may be null
5657
* @return The sorted list
58+
* @since Commons IO 2.0
5759
*/
5860
public List<File> sort(List<File> files) {
5961
if (files != null) {

src/java/org/apache/commons/io/filefilter/FileFilterUtils.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,7 @@ public static IOFileFilter sizeRangeFileFilter(long minSizeInclusive, long maxSi
626626
*
627627
* @throws IllegalArgumentException if <code>magicNumber</code> is
628628
* <code>null</code> or the empty String.
629+
* @since Commons IO 2.0
629630
*/
630631
public static IOFileFilter magicNumberFileFilter(String magicNumber) {
631632
return new MagicNumberFileFilter(magicNumber);
@@ -645,6 +646,7 @@ public static IOFileFilter magicNumberFileFilter(String magicNumber) {
645646
* @throws IllegalArgumentException if <code>magicNumber</code> is
646647
* <code>null</code> or the empty String, or if offset is a
647648
* negative number.
649+
* @since Commons IO 2.0
648650
*/
649651
public static IOFileFilter magicNumberFileFilter(String magicNumber, long offset) {
650652
return new MagicNumberFileFilter(magicNumber, offset);
@@ -662,6 +664,7 @@ public static IOFileFilter magicNumberFileFilter(String magicNumber, long offset
662664
*
663665
* @throws IllegalArgumentException if <code>magicNumber</code> is
664666
* <code>null</code> or is of length zero.
667+
* @since Commons IO 2.0
665668
*/
666669
public static IOFileFilter magicNumberFileFilter(byte[] magicNumber) {
667670
return new MagicNumberFileFilter(magicNumber);
@@ -681,6 +684,7 @@ public static IOFileFilter magicNumberFileFilter(byte[] magicNumber) {
681684
* @throws IllegalArgumentException if <code>magicNumber</code> is
682685
* <code>null</code>, or contains no bytes, or <code>offset</code>
683686
* is a negative number.
687+
* @since Commons IO 2.0
684688
*/
685689
public static IOFileFilter magicNumberFileFilter(byte[] magicNumber, long offset) {
686690
return new MagicNumberFileFilter(magicNumber, offset);

src/java/org/apache/commons/io/filefilter/MagicNumberFileFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
* System.out.println(tarFile);
5959
* }
6060
* </pre></code>
61-
*
61+
* @since Commons IO 2.0
6262
*/
6363
public class MagicNumberFileFilter extends AbstractFileFilter implements
6464
Serializable {

src/java/org/apache/commons/io/input/AutoCloseInputStream.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ public void close() throws IOException {
6969
*
7070
* @param n number of bytes read, or -1 if no more bytes are available
7171
* @throws IOException if the stream could not be closed
72+
* @since Commons IO 2.0
7273
*/
7374
@Override
7475
protected void afterRead(int n) throws IOException {

0 commit comments

Comments
 (0)