Interface FileCodec
-
- All Known Implementing Classes:
PathFileCodec
public interface FileCodec
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Stringread(java.lang.String file)Reads the specified filevoidwrite(java.lang.String file, java.lang.String content)Writes the provided data to the specified file
-
-
-
Method Detail
-
read
java.lang.String read(java.lang.String file) throws java.lang.IllegalStateExceptionReads the specified file- Parameters:
file- the file to read- Returns:
- a list of all the lines in the specified file, or null when the file does not exist
- Throws:
java.lang.IllegalStateException- if something unexpected happened while reading the file
-
write
void write(java.lang.String file, java.lang.String content) throws java.lang.IllegalStateExceptionWrites the provided data to the specified file- Parameters:
file- the file to write tocontent- the data to write- Throws:
java.lang.IllegalStateException- if something unexpected happened while writing the file
-
-