public class FileService extends Object
Constructor and Description |
---|
FileService() |
Modifier and Type | Method and Description |
---|---|
static void |
appendTextToOneLine(String filename,
String textStr)
Open the file for writing and write a text string.
|
static void |
appendTextToOneLine(String filename,
String[] textArray)
Open the file for writing and write textArray separated by a space to file all in one line.
|
static void |
main(String[] args) |
static void |
printDocumentToFile(String filename,
Document docSource)
Print a document to a text file.
|
static void |
printDocumentToFile(String filename,
DOMSource domSource)
Print a document (DOMSource) to a text file.
|
static void |
printStackTraceToFile(String filename,
Exception exception)
Print a stack trace to a text file.
|
public static void main(String[] args)
public static void appendTextToOneLine(String filename, String textStr)
filename
- Output filenametextArray
- An array of stringspublic static void appendTextToOneLine(String filename, String[] textArray)
filename
- Output filenametextArray
- An array of stringspublic static void printStackTraceToFile(String filename, Exception exception)
filename
- Output filename.exception
- The exception to print stack trace of.public static void printDocumentToFile(String filename, Document docSource)
filename
- Output filename.docSource
- The document (Document) to be printedCopyright © 2021 Jet Propulsion Laboratory, California Institute of Technology. All rights reserved.