Hi,

Sample code is below. You need to import org.apache.commons.io.IOUtils.

        FileInputStream fileInputStream = null;
        OutputStream outputStream = null;
        try {
            outputStream = response.getOutputStream();
            fileInputStream = new FileInputStream(file);
            .........
            .........

        } catch (FileNotFoundException e) {
            .........
        } catch (IOException e) {
           ..........
        } finally {
           IOUtils.closeQuietly(fileInputStream);
           IOUtils.closeQuietly(outputStream);
        }

On Mon, Sep 27, 2010 at 10:26 AM, Afkham Azeez <az...@wso2.com> wrote:

> Yes, if that is better, and if we don't have to introduce a dependency just
> to do this. Can you post the relevant sample code segment?
>
> Azeez
>
_______________________________________________
Carbon-dev mailing list
Carbon-dev@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to