55 * The ASF licenses this file to You under the Apache License, Version 2.0
66 * (the "License"); you may not use this file except in compliance with
77 * the License. You may obtain a copy of the License at
8- *
8+ *
99 * http://www.apache.org/licenses/LICENSE-2.0
10- *
10+ *
1111 * Unless required by applicable law or agreed to in writing, software
1212 * distributed under the License is distributed on an "AS IS" BASIS,
1313 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -121,7 +121,7 @@ public FileSystemUtils() {
121121 * of {@link #freeSpaceKb(String)} which returns a result in kilobytes.
122122 * <p>
123123 * Note that some OS's are NOT currently supported, including OS/390,
124- * OpenVMS.
124+ * OpenVMS.
125125 * <pre>
126126 * FileSystemUtils.freeSpace("C:"); // Windows
127127 * FileSystemUtils.freeSpace("/volume"); // *nix
@@ -214,7 +214,7 @@ public static long freeSpaceKb(final String path, final long timeout) throws IOE
214214 * @since 2.0
215215 */
216216 public static long freeSpaceKb () throws IOException {
217- return freeSpaceKb (-1 );
217+ return freeSpaceKb (-1 );
218218 }
219219
220220 /**
@@ -232,9 +232,9 @@ public static long freeSpaceKb() throws IOException {
232232 * @since 2.0
233233 */
234234 public static long freeSpaceKb (final long timeout ) throws IOException {
235- return freeSpaceKb (new File ("." ).getAbsolutePath (), timeout );
235+ return freeSpaceKb (new File ("." ).getAbsolutePath (), timeout );
236236 }
237-
237+
238238 //-----------------------------------------------------------------------
239239 /**
240240 * Returns the free space on a drive or volume in a cross-platform manner.
@@ -290,13 +290,13 @@ long freeSpaceWindows(String path, final long timeout) throws IOException {
290290 if (path .length () > 0 && path .charAt (0 ) != '"' ) {
291291 path = "\" " + path + "\" " ;
292292 }
293-
293+
294294 // build and run the 'dir' command
295295 final String [] cmdAttribs = new String [] {"cmd.exe" , "/C" , "dir /a /-c " + path };
296-
296+
297297 // read in the output of the command to an ArrayList
298298 final List <String > lines = performCommand (cmdAttribs , Integer .MAX_VALUE , timeout );
299-
299+
300300 // now iterate over the lines we just read and find the LAST
301301 // non-empty line (the free space bytes should be in the last element
302302 // of the ArrayList anyway, but this will ensure it works even if it's
@@ -354,7 +354,7 @@ long parseDir(final String line, final String path) throws IOException {
354354 "Command line 'dir /-c' did not return valid info " +
355355 "for path '" + path + "'" );
356356 }
357-
357+
358358 // remove commas and dots in the bytes count
359359 final StringBuilder buf = new StringBuilder (line .substring (bytesStart , bytesEnd ));
360360 for (int k = 0 ; k < buf .length (); k ++) {
@@ -390,9 +390,9 @@ long freeSpaceUnix(final String path, final boolean kb, final boolean posix, fin
390390 if (posix ) {
391391 flags += "P" ;
392392 }
393- final String [] cmdAttribs =
393+ final String [] cmdAttribs =
394394 flags .length () > 1 ? new String [] {DF , flags , path } : new String [] {DF , path };
395-
395+
396396 // perform the command, asking for up to 3 lines (header, interesting, overflow)
397397 final List <String > lines = performCommand (cmdAttribs , 3 , timeout );
398398 if (lines .size () < 2 ) {
@@ -402,7 +402,7 @@ long freeSpaceUnix(final String path, final boolean kb, final boolean posix, fin
402402 "for path '" + path + "'- response was " + lines );
403403 }
404404 final String line2 = lines .get (1 ); // the line we're interested in
405-
405+
406406 // Now, we tokenize the string. The fourth element is what we want.
407407 StringTokenizer tok = new StringTokenizer (line2 , " " );
408408 if (tok .countTokens () < 4 ) {
@@ -427,7 +427,7 @@ long freeSpaceUnix(final String path, final boolean kb, final boolean posix, fin
427427 //-----------------------------------------------------------------------
428428 /**
429429 * Parses the bytes from a string.
430- *
430+ *
431431 * @param freeSpace the free space string
432432 * @param path the path
433433 * @return the number of bytes
@@ -442,7 +442,7 @@ long parseBytes(final String freeSpace, final String path) throws IOException {
442442 "for path '" + path + "'- check path is valid" );
443443 }
444444 return bytes ;
445-
445+
446446 } catch (final NumberFormatException ex ) {
447447 throw new IOExceptionWithCause (
448448 "Command line '" + DF + "' did not return numeric data as expected " +
@@ -469,7 +469,7 @@ List<String> performCommand(final String[] cmdAttribs, final int max, final long
469469 // http://forum.java.sun.com/thread.jspa?threadID=533029&messageID=2572018
470470 // however, its still not perfect as the JDK support is so poor
471471 // (see commons-exec or Ant for a better multi-threaded multi-os solution)
472-
472+
473473 final List <String > lines = new ArrayList <String >(20 );
474474 Process proc = null ;
475475 InputStream in = null ;
@@ -492,7 +492,7 @@ List<String> performCommand(final String[] cmdAttribs, final int max, final long
492492 lines .add (line );
493493 line = inr .readLine ();
494494 }
495-
495+
496496 proc .waitFor ();
497497
498498 ThreadMonitor .stop (monitor );
@@ -510,7 +510,7 @@ List<String> performCommand(final String[] cmdAttribs, final int max, final long
510510 "for command " + Arrays .asList (cmdAttribs ));
511511 }
512512 return lines ;
513-
513+
514514 } catch (final InterruptedException ex ) {
515515 throw new IOExceptionWithCause (
516516 "Command line threw an InterruptedException " +
0 commit comments