Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileInputStream did not closed!! #2640

Open
epubreader opened this issue Feb 19, 2022 · 0 comments
Open

FileInputStream did not closed!! #2640

epubreader opened this issue Feb 19, 2022 · 0 comments

Comments

@epubreader
Copy link

        FileInputStream assetStream = new FileInputStream(baseLocalFile);
        BufferedInputStream original = new BufferedInputStream(assetStream);
        original.mark(0);

        Operation[] operations = artifactService.buildOperations(convertedParameters, original, staticAsset.getMimeType());
        InputStream converted = artifactService.convert(original, operations, staticAsset.getMimeType());

        createLocalFileFromInputStream(converted, cacheFile);
        if ("image/gif".equals(mimeType)) {
            mimeType = "image/png";
        }
        return buildModel(cacheFile.getAbsolutePath(), mimeType);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant