Created
September 25, 2012 09:42
-
-
Save gr4y/3780918 to your computer and use it in GitHub Desktop.
Let's guess what's easier and cleaner code. Example A or Example B?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final ByteArrayOutputStream out = new ByteArrayOutputStream(); | |
... | |
try { | |
wb.write(out); | |
} catch (final IOException e) { | |
throw new DocumentBuilderException(e); | |
} | |
return out.toByteArray(); | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wb.getBytes(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment