#vulnerable code 
                                @Override
    public byte[] getAll() throws IOException {
        final ByteArrayOutputStream baos = new ByteArrayOutputStream();

        InputStream is = null;
        boolean canThrow = false;
        try {
            is = new FileInputStream(file);
            is = new BufferedInputStream(is);
            final byte[] buffer = new byte[1024];
            int read;
            while ((read = is.read(buffer)) > 0) {
                baos.write(buffer, 0, read);
            }
            final byte[] ret = baos.toByteArray();
            canThrow = true;
            return ret;
        } finally {
            IoUtils.closeQuietly(canThrow, is);
        }
    } 
                            #location 19 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                @Override
    public byte[] getAll() throws IOException {
        final ByteArrayOutputStream baos = new ByteArrayOutputStream();

        try (FileInputStream fis = new FileInputStream(file);
                InputStream is = new BufferedInputStream(fis)) {
            final byte[] buffer = new byte[1024];
            int read;
            while ((read = is.read(buffer)) > 0) {
                baos.write(buffer, 0, read);
            }
            final byte[] ret = baos.toByteArray();
            return ret;
        }
    }