Skip to content

Commit

Permalink
Not closing the base 64 writer until after getting the content. Was l…
Browse files Browse the repository at this point in the history
…osing bytes.
  • Loading branch information
douglm committed Jan 8, 2019
1 parent b248db1 commit c83e77e
Showing 1 changed file with 1 addition and 4 deletions.
Expand Up @@ -187,14 +187,11 @@ public String getEncodedContent() throws CalFacadeException {
while((len = str.read(buffer)) != -1) {
b64out.write(buffer, 0, len);
}
b64out.close();

return new String(baos.toByteArray());
} catch (final Throwable t) {
throw new CalFacadeException(t);
} finally {
try {
b64out.close();
} catch (Throwable t) {}
}
}

Expand Down

0 comments on commit c83e77e

Please sign in to comment.