[Carbon-dev] FindBugs hackathon on 23rd Sep 2010

Ruchira Wageesha ruchira at wso2.com
Sun Sep 26 22:25:38 PDT 2010


  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 <azeez at 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.wso2.org/pipermail/carbon-dev/attachments/20100927/4453c5e1/attachment.htm 


More information about the Carbon-dev mailing list