public class ListFile
extends java.lang.Object
Constructor and Description |
---|
ListFile(java.lang.String path,
java.lang.String extension) |
Modifier and Type | Method and Description |
---|---|
void |
addLine(java.lang.String line)
Adds a line to the end of the file
|
void |
clear()
Clears the file of all data
|
void |
delete()
Deletes the file
|
java.util.List<java.lang.String> |
read() |
void |
write(java.util.List<java.lang.String> list)
Writes a List to the file line by line
|
public ListFile(java.lang.String path, java.lang.String extension)
path
- The path of the new, or existing fileextension
- The extension of the file excluding the periodpublic java.util.List<java.lang.String> read()
public void write(java.util.List<java.lang.String> list)
list
- The List to savepublic void addLine(java.lang.String line)
line
- The line to addpublic void clear()
public void delete()