Package edu.pdx.cs410J.family
Class TextDumper
java.lang.Object
edu.pdx.cs410J.family.TextDumper
- All Implemented Interfaces:
Dumper
This class dumps a family tree to a destination (for example, a
file) in a text-based format that is meant to be parsed by a
TextParser. It is not necessarily human-readable.
- Author:
- David Whitlock
- See Also:
-
Constructor Summary
ConstructorDescriptionTextDumper
(File file) Creates a new text dumper that dumps to a given file.Creates a new text dumper that prints to aPrintWriter
.TextDumper
(String fileName) Creates a new text dumper that dumps to a file of a given name. -
Method Summary
Modifier and TypeMethodDescriptionvoid
dump
(FamilyTree tree) Dumps the contents of a family tree to the desired desitination.static void
Test program.
-
Constructor Details
-
TextDumper
Creates a new text dumper that dumps to a file of a given name. If the file does not exist, it is created.- Throws:
IOException
-
TextDumper
Creates a new text dumper that dumps to a given file.- Throws:
IOException
-
TextDumper
Creates a new text dumper that prints to aPrintWriter
. This way, we can dump to destinations other than files.
-
-
Method Details