Java File to OutputStream newOutputStream(File file)

Here you can find the source of newOutputStream(File file)

Description

new Output Stream

License

Apache License

Declaration

public static OutputStream newOutputStream(File file) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;

import java.io.OutputStream;
import java.io.UncheckedIOException;

public class Main {
    public static OutputStream newOutputStream(File file) {
        return newFileOutputStream(file);
    }/*from w ww.j  a  va 2 s  .c o  m*/

    public static FileOutputStream newFileOutputStream(File file) {
        try {
            return new FileOutputStream(file);
        } catch (IOException e) {
            throw new UncheckedIOException(e);
        }
    }
}

Related

  1. newOutputStream()
  2. newOutputStream()
  3. newOutputStream(File file)
  4. openOutputStream(File file)
  5. openOutputStream(File file)
  6. openOutputStream(File file)
  7. openOutputStream(File file)