Example usage for java.io BufferedOutputStream BufferedOutputStream

List of usage examples for java.io BufferedOutputStream BufferedOutputStream

Introduction

In this page you can find the example usage for java.io BufferedOutputStream BufferedOutputStream.

Prototype

public BufferedOutputStream(OutputStream out) 

Source Link

Document

Creates a new buffered output stream to write data to the specified underlying output stream.

Usage

From source file:com.streamsets.pipeline.stage.processor.geolocation.TestGeolocationProcessor.java

@Before
public void setup() throws Exception {
    tempDir = Files.createTempDir();
    databaseFile = new File(tempDir, "GeoLite2-Country.mmdb");
    BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(databaseFile));
    Resources.copy(Resources.getResource("GeoLite2-Country.mmdb"), out);
    out.flush();/* w w  w . j  a v  a  2s  .co m*/
    out.close();
}