java(42) Language: English


Useful Java Things to remember

Combine multiple collections

http://stackoverflow.com/questions/4896662/combine-multiple-collections-into-a-single-logical-collection

Iterables.concat()

Prevent File Descriptor Leakage

http://bryanmarty.com/blog/2012/01/22/process-leaking-file-descriptors/

Process p = Runtime.getRuntime().exec(...);
p.getInputStream().close();
p.getOutputStream().close();
p.getErrorStream().close();

Zum Seitenanfang