public class DiskWriter
extends java.lang.Object
Constructor and Description |
---|
DiskWriter() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
insertFileName(java.lang.String fileName,
java.lang.String difference)
Used to insert a difference string with preserving the file extension
|
static void |
replaceFile(java.lang.String filename,
byte[] fileContents,
boolean debug)
Deletes the original file if it exists, then writes the fileContents[] to
the file.
|
static void |
replaceFile(java.lang.String filename,
java.lang.String lineToWrite,
boolean debug)
Deletes the original file if it exists, then writes the lineToWrite to
the file.
|
static void |
writeNewLine(java.lang.String filename,
byte[] fileContents,
boolean debug)
Writes a new line to the file, if it doesn't exist it will automatically
create it.
|
static void |
writeNewLine(java.lang.String filename,
java.lang.String lineToWrite,
boolean debug)
Writes a string to the file
|
public static java.lang.String insertFileName(java.lang.String fileName, java.lang.String difference)
fileName
- The file namedifference
- Normally an integerpublic static void writeNewLine(java.lang.String filename, byte[] fileContents, boolean debug)
filename
- fileContents
- debug
- public static void writeNewLine(java.lang.String filename, java.lang.String lineToWrite, boolean debug)
filename
- lineToWrite
- debug
- public static void replaceFile(java.lang.String filename, byte[] fileContents, boolean debug)
filename
- fileContents
- debug
- public static void replaceFile(java.lang.String filename, java.lang.String lineToWrite, boolean debug)
filename
- lineToWrite
- debug
-