de.goerntkai.toolbox.fs
Class TextWriter

java.lang.Object
  extended byde.goerntkai.toolbox.fs.TextWriter

public abstract class TextWriter
extends java.lang.Object

Writes the complete text in one file.

Version:
$Id: TextWriter.java,v 1.5 2007/05/06 16:25:52 GoerntKai Exp $
Author:
Kai Görnt

Method Summary
static void setTextDocument(java.io.File documentFile, java.lang.String text)
          This method uses FileWriter to write the content of the document file.
static void setTextDocument(java.io.File documentFile, java.lang.StringBuffer text)
          This method just calls setTextDocument(java.io.File, java.lang.String) to write the content of the document file.
static void setTextDocument(java.lang.String documentFile, java.lang.String text)
          This method just calls setTextDocument(java.io.File, java.lang.String) to write the content of the document file.
static void setTextDocument(java.lang.String documentFile, java.lang.StringBuffer text)
          This method just calls setTextDocument(java.io.File, java.lang.String) to write the content of the document file.
static void setTextLines(java.io.File theFile, java.lang.String[] textLines)
          Writes every element of the array to a new line.
static void setTextLines(java.lang.String theFile, java.lang.String[] textLines)
          Writes every element of the array to a new line.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setTextDocument

public static void setTextDocument(java.io.File documentFile,
                                   java.lang.String text)

This method uses FileWriter to write the content of the document file.

Parameters:
documentFile - the file to write to
text - the content of the document

setTextDocument

public static void setTextDocument(java.io.File documentFile,
                                   java.lang.StringBuffer text)

This method just calls setTextDocument(java.io.File, java.lang.String) to write the content of the document file.

Parameters:
documentFile - the file to write to
text - the content of the document
See Also:
setTextDocument(File, String)

setTextDocument

public static void setTextDocument(java.lang.String documentFile,
                                   java.lang.String text)

This method just calls setTextDocument(java.io.File, java.lang.String) to write the content of the document file.

Parameters:
documentFile - the name of the file to write to
text - the content of the document
See Also:
setTextDocument(File, String)

setTextDocument

public static void setTextDocument(java.lang.String documentFile,
                                   java.lang.StringBuffer text)

This method just calls setTextDocument(java.io.File, java.lang.String) to write the content of the document file.

Parameters:
documentFile - the name of the file to write to
text - the content of the document
See Also:
setTextDocument(File, String)

setTextLines

public static void setTextLines(java.io.File theFile,
                                java.lang.String[] textLines)

Writes every element of the array to a new line.

Precondition:
theFile != null

Parameters:
theFile - the file to write to (must not be null)
textLines - the lines to write

setTextLines

public static void setTextLines(java.lang.String theFile,
                                java.lang.String[] textLines)

Writes every element of the array to a new line.

Precondition:
theFile != null

Parameters:
theFile - the file to write to (must not be null)
textLines - the lines to write


Copyright © 2004-2007 Kai Görnt. All Rights Reserved.