tools.io
Class Dir

java.lang.Object
  extended bytools.io.Dir

public class Dir
extends Object

Lists contents of a given path in the local file system.

Version:
"$Id: Dir.java 1913 2007-08-08 02:41:53Z jpeters $"
Author:
Jan Peters

Constructor Summary
Dir()
           
 
Method Summary
static void main(String[] argv)
           
private static String trimDate(long time)
          Returns the string representation of a date given in milliseconds since January 1, 1970, 00:00:00 GMT.
private static String trimLong(long l)
          Returns the string representation of a long, trimmed to the maximum length of a long by filling the string with whitespaces from the left.
private static String trimString(String str, int maxlen)
          If the length of the given string is less than the given length, then the string is trimmed by inserting whitespaces from the left till the given length is reached.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dir

public Dir()
Method Detail

trimString

private static String trimString(String str,
                                 int maxlen)
If the length of the given string is less than the given length, then the string is trimmed by inserting whitespaces from the left till the given length is reached. Otherwise the given string is returned as is.


trimLong

private static String trimLong(long l)
Returns the string representation of a long, trimmed to the maximum length of a long by filling the string with whitespaces from the left.


trimDate

private static String trimDate(long time)
Returns the string representation of a date given in milliseconds since January 1, 1970, 00:00:00 GMT. The returned string has the following format and is trimmed to a length of 17 characters: // : AM|PM


main

public static void main(String[] argv)
                 throws FileNotFoundException,
                        IOException
Throws:
FileNotFoundException
IOException


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.