Java Utililty Methods File to OutputStream

List of utility methods to do File to OutputStream

Description

The list of methods to do File to OutputStream are organized into topic(s).

Method

FileOutputStreamopenOutputStream(String filePath)
open Output Stream
return openOutputStream(new File(filePath), false);
OutputStreamopenOutputStream(String outputName)
open Output Stream
if (outputName == null || outputName.equals("-")) {
    return System.out;
} else if (outputName.endsWith(".gz")) {
    return new GZIPOutputStream(new FileOutputStream(outputName));
} else {
    return new BufferedOutputStream(new FileOutputStream(outputName));
OutputStreamoutStream(final File aFile)
out Stream
return new BufferedOutputStream(new FileOutputStream(aFile, true));
DataOutputStreamoutStream(String file)
out Stream
return outStream(new File(file));