Example usage for org.apache.commons.io ExtendedIOUtils copyLarge

List of usage examples for org.apache.commons.io ExtendedIOUtils copyLarge

Introduction

In this page you can find the example usage for org.apache.commons.io ExtendedIOUtils copyLarge.

Prototype

public static final long copyLarge(InputStream input, OutputStream output, long copySize) throws IOException 

Source Link

Usage

From source file:net.community.chest.gitcloud.facade.AbstractEnvironmentInitializer.java

protected long extractConfigFile(InputStream srcData, File targetFile, byte[] cpyBuf) throws IOException {
    if (srcData == null) {
        throw new FileNotFoundException("No input stream");
    }/*  w  w w  .j ava2s. co  m*/

    try {
        return ExtendedIOUtils.copyLarge(srcData, targetFile, cpyBuf);
    } finally {
        srcData.close();
    }
}