net.sourceforge.cruisecontrol.util
Class IO

java.lang.Object
  extended bynet.sourceforge.cruisecontrol.util.IO

public final class IO
extends java.lang.Object

This class provides helper methods for interacting with Input/Output classes.


Method Summary
static void close(java.io.InputStream i)
           
static void close(java.io.OutputStream o)
           
static void close(java.lang.Process p)
           
static void close(java.io.Reader r)
           
static void close(java.io.Writer w)
           
static void delete(java.io.File f)
          Deletes a File instance.
static void delete(java.io.File f, boolean debuggerOn, org.apache.log4j.Logger log)
           
static void dumpTo(java.io.File f, java.io.PrintStream out)
          Writes the contents of a file to a PrintStream.
static void output(java.io.File to, org.jdom.Element xml, java.lang.String encoding)
           
static java.util.List readLines(java.io.File source)
           
static void write(java.io.File f, java.lang.String contents)
          Write the content to the file.
static void write(java.lang.String fileName, java.lang.String content)
          Write the content to the file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

close

public static void close(java.io.OutputStream o)

close

public static void close(java.io.InputStream i)

close

public static void close(java.io.Reader r)

close

public static void close(java.io.Writer w)

close

public static void close(java.lang.Process p)

output

public static void output(java.io.File to,
                          org.jdom.Element xml,
                          java.lang.String encoding)
                   throws CruiseControlException
Throws:
CruiseControlException

delete

public static void delete(java.io.File f)
Deletes a File instance. If the file represents a directory, all the subdirectories and files within.


delete

public static void delete(java.io.File f,
                          boolean debuggerOn,
                          org.apache.log4j.Logger log)

dumpTo

public static void dumpTo(java.io.File f,
                          java.io.PrintStream out)
Writes the contents of a file to a PrintStream.


write

public static void write(java.lang.String fileName,
                         java.lang.String content)
                  throws CruiseControlException
Write the content to the file.

Throws:
CruiseControlException

write

public static void write(java.io.File f,
                         java.lang.String contents)
                  throws CruiseControlException
Write the content to the file.

Throws:
CruiseControlException

readLines

public static java.util.List readLines(java.io.File source)
                                throws CruiseControlException
Returns:
List of lines of text (String objects)
Throws:
CruiseControlException