org.znerd.dir2xml
Class Dir2XML

java.lang.Object
  |
  +--org.znerd.dir2xml.Dir2XML

public class Dir2XML
extends Object

Creates an XML file that describes a certain directory.

Version:
$Revision: 1.6 $ $Date: 2002/06/24 12:50:42 $
Author:
Ernst de Haan (znerd@FreeBSD.org)

Method Summary
static void dir2xml(File directory, Writer out)
          Generates an XML document for the specified directory.
static void main(String[] arguments)
          Main function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

main

public static final void main(String[] arguments)
                       throws IOException
Main function. This function is called when this class is executed as a program.

Expected is exactly one argument, being the name of the directory to generate XML for. If more or less arguments are given, then a message is printed.

Parameters:
arguments - the arguments, possibly null.
Throws:
IOException - in case outputting the XML failed.

dir2xml

public static final void dir2xml(File directory,
                                 Writer out)
Generates an XML document for the specified directory.
Parameters:
directory - the directory, which must exist.
out - the writer to send the output to, not null.
Returns:
an XML document describing the specified directory, never null.
Throws:
IllegalArgumentException - if directory == null || !directory.exists() || !directory.isDirectory() || out == null.


See http://dir2xml.sourceforge.net/.