private void deleteEmptyFileOnException(OutputStream outputStream, String path) {
        try {
            outputStream.close();
            File fileToDelete = new File(path);
            fileToDelete.delete();
        }
        catch (Exception e) {
            // Best effort delete.
        }
    }
private void deleteEmptyFileOnException(OutputStream outputStream, String path) {
        try {
            outputStream.close();
            File fileToDelete = new File(path);
            fileToDelete.delete();
        }
        catch (Exception e) {
            
        }
    }
private void deleteEmptyFileOnException ( OutputStream outputStream , String path ) { try { outputStream . close ( ) ; File fileToDelete = new File ( path ) ; fileToDelete . delete ( ) ; } catch ( Exception e ) { // Best effort delete. } }
Helper to delete an empty file in the case of an exception

@param outputStream
@param path
@throws IOException
Helper to delete an empty file in the case of an exception