public final class WriteFileExtensions extends Object
WriteFileExtensions provides methods for writing in files.| Constructor and Description |
|---|
WriteFileExtensions() |
| Modifier and Type | Method and Description |
|---|---|
static void |
readSourceFileAndWriteDestFile(String srcfile,
String destFile)
Deprecated.
use instead the same name method in the class
WriteFileQuietlyExtensions.
Note: will be removed in the next minor release. |
static void |
storeByteArrayToFile(byte[] data,
File file)
Deprecated.
use instead the same name method in the class
WriteFileQuietlyExtensions.
Note: will be removed in the next minor release. |
static boolean |
string2File(File file,
String string2write)
Deprecated.
use instead the same name method in the class
WriteFileQuietlyExtensions.
Note: will be removed in the next minor release. |
static boolean |
string2File(File file,
String string2write,
String encoding)
Deprecated.
use instead the same name method in the class
WriteFileQuietlyExtensions.
Note: will be removed in the next minor release. |
static void |
string2File(String string2write,
String nameOfFile)
Deprecated.
use instead the same name method in the class
WriteFileQuietlyExtensions.
Note: will be removed in the next minor release. |
static void |
write(InputStream inputStream,
OutputStream outputStream)
Writes the given input stream to the output stream.
|
static void |
write2File(Reader reader,
Writer writer)
Deprecated.
use instead the same name method in the class
WriteFileQuietlyExtensions.
Note: will be removed in the next minor release. |
static void |
write2File(Reader reader,
Writer writer,
boolean closeStream)
Deprecated.
use instead the same name method without the closeStream flag.
|
static void |
write2File(String inputFile,
String outputFile)
Deprecated.
use instead the same name method in the class
WriteFileQuietlyExtensions.
Note: will be removed in the next minor release. |
static void |
write2File(String inputFile,
Writer writer)
Deprecated.
use instead the same name method in the class
WriteFileQuietlyExtensions.
Note: will be removed in the next minor release. |
static void |
write2File(String inputFile,
Writer writer,
boolean closeWriter)
Deprecated.
use instead the same name method without the closeWriter flag.
Note: will be removed in the next minor release. |
static void |
write2FileWithBuffer(String inputFile,
String outputFile)
Deprecated.
use instead the same name method in the class
WriteFileQuietlyExtensions.
Note: will be removed in the next minor release. |
static void |
writeByteArrayToFile(File file,
byte[] byteArray)
Writes the given byte array to the given file.
|
static void |
writeByteArrayToFile(String filename,
byte[] byteArray)
Writes the given byte array to a file.
|
static void |
writeLinesToFile(Collection<String> collection,
File output)
Deprecated.
use instead the same name method in the class
WriteFileQuietlyExtensions.
Note: will be removed in the next minor release. |
static void |
writeLinesToFile(Collection<String> collection,
File output,
String encoding)
Deprecated.
use instead the same name method in the class
WriteFileQuietlyExtensions.
Note: will be removed in the next minor release. |
static void |
writeLinesToFile(File output,
List<String> input,
String encoding)
Deprecated.
use instead the same name method in the class
WriteFileQuietlyExtensions.
Note: will be removed in the next minor release. |
static void |
writeProperties2File(String filename,
Properties properties)
Deprecated.
use instead the same name method in the class
WriteFileQuietlyExtensions.
Note: will be removed in the next minor release. |
static boolean |
writeStringToFile(File file,
String string2write,
String encoding)
Deprecated.
use instead the same name method in the class
WriteFileQuietlyExtensions.
Note: will be removed in the next minor release. |
public static void readSourceFileAndWriteDestFile(String srcfile, String destFile)
WriteFileQuietlyExtensions.
srcfile - The source file.destFile - The destination file.public static void storeByteArrayToFile(byte[] data,
File file)
WriteFileQuietlyExtensions.
data - The byte array to be saved.file - The file to save the byte array.public static boolean string2File(File file, String string2write)
WriteFileQuietlyExtensions.
file - The File to write the String.string2write - The String to write into the File.public static boolean string2File(File file, String string2write, String encoding)
WriteFileQuietlyExtensions.
file - The File to write the String.string2write - The String to write into the File.encoding - the encodingpublic static void string2File(String string2write, String nameOfFile)
WriteFileQuietlyExtensions.
string2write - The String to write into the file.nameOfFile - The path to the file and name from the file from where we want to write the
String.public static void write(InputStream inputStream, OutputStream outputStream) throws FileNotFoundException, IOException
inputStream - the input streamoutputStream - the output streamFileNotFoundException - the file not found exceptionIOException - Signals that an I/O exception has occurred.public static void write2File(Reader reader, Writer writer, boolean closeStream)
reader - The opened Reader.writer - The opened Writer.closeStream - not in use.public static void write2File(Reader reader, Writer writer)
WriteFileQuietlyExtensions.
reader - The opened Reader.writer - The opened Writer.public static void write2File(String inputFile, String outputFile)
WriteFileQuietlyExtensions.
inputFile - The Name from the File to read and copy.outputFile - The Name from the File to write into.public static void write2File(String inputFile, Writer writer, boolean closeWriter)
inputFile - The Name from the File to read and copy.writer - The PrintWriter to write into.closeWriter - If true then close the outputStream otherwise keep open.public static void write2File(String inputFile, Writer writer)
WriteFileQuietlyExtensions.
inputFile - The Name from the File to read and copy.writer - The PrintWriter to write into.public static void write2FileWithBuffer(String inputFile, String outputFile)
WriteFileQuietlyExtensions.
inputFile - The Path to the File and name from the file from where we read.outputFile - The Path to the File and name from the file from where we want to write.public static void writeByteArrayToFile(File file, byte[] byteArray) throws IOException
file - The file.byteArray - The byte array.IOException - Signals that an I/O exception has occurred.public static void writeByteArrayToFile(String filename, byte[] byteArray) throws IOException
filename - The filename from the file.byteArray - The byte array.IOException - Signals that an I/O exception has occurred.public static void writeLinesToFile(Collection<String> collection, File output)
WriteFileQuietlyExtensions.
collection - The collection to write to file.output - The output-file.public static void writeLinesToFile(Collection<String> collection, File output, String encoding)
WriteFileQuietlyExtensions.
collection - The collection to write to file.output - The output-file.encoding - the encodingpublic static void writeLinesToFile(File output, List<String> input, String encoding)
WriteFileQuietlyExtensions.
output - The file to write the lines.input - The list with the input data.encoding - The encoding.public static void writeProperties2File(String filename, Properties properties)
WriteFileQuietlyExtensions.
filename - The filename from the file to write the properties.properties - The properties.public static boolean writeStringToFile(File file, String string2write, String encoding)
WriteFileQuietlyExtensions.
file - The File to write the String.string2write - The String to write into the File.encoding - The encoding from the file.Copyright © 2015–2018 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.