public class Files
extends java.lang.Object
Implements methods to manage data files
Constructor and Description |
---|
Files() |
Modifier and Type | Method and Description |
---|---|
static void |
addToFile(java.lang.String fileName,
java.lang.String content)
Adds data in the file, avoiding overwrite previous content
|
static java.lang.String |
readFile(java.lang.String fileName)
Read a file and returns the content
|
static void |
writeFile(java.lang.String fileName,
java.lang.String content)
Writes data in the file, overwriting previous content
|
public static java.lang.String readFile(java.lang.String fileName)
Read a file and returns the content
fileName
- Name of the file to readpublic static void writeFile(java.lang.String fileName, java.lang.String content)
Writes data in the file, overwriting previous content
fileName
- Name of the file to readcontent
- The content to be writtenpublic static void addToFile(java.lang.String fileName, java.lang.String content)
Adds data in the file, avoiding overwrite previous content
fileName
- Name of the file to readcontent
- The content to be written