|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.samcrow.io.IOBase
public abstract class IOBase
Base class for writing maps to files and reading them from files.
Field Summary | |
---|---|
protected java.io.File |
file
|
Constructor Summary | |
---|---|
IOBase(java.io.File inFile)
Constructor with a given File object |
|
IOBase(java.lang.String inFilename)
Constructor with a given file path |
Method Summary | |
---|---|
abstract IOResponse |
read()
Read the file; get the nodes and links defined in it. This method is designed to be relatively robust. |
abstract void |
write(java.util.Collection<Node> nodes,
java.util.Collection<Link> links)
Writes to the file that this instance uses |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.io.File file
Constructor Detail |
---|
public IOBase(java.lang.String inFilename)
inFilename
- the name or path of the filepublic IOBase(java.io.File inFile)
inFile
- the File objectMethod Detail |
---|
public abstract void write(java.util.Collection<Node> nodes, java.util.Collection<Link> links)
nodes
- the nodes to writelinks
- the links to writepublic abstract IOResponse read() throws java.text.ParseException
java.text.ParseException
- if the file is invalid
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |