X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=src%2Fde%2Fj32%2Futil%2FUtil.java;h=db43919e14ea2568253b061de5ab109321c234d0;hb=276d9a69fa796728169c2992921a1e4bd875f549;hp=95a3f7873a740adef6a55b2557c3fd569bdac47d;hpb=aeb7d91db3d650d30a9191cbe84192d6b3b23df7;p=jpim.git diff --git a/src/de/j32/util/Util.java b/src/de/j32/util/Util.java index 95a3f78..db43919 100644 --- a/src/de/j32/util/Util.java +++ b/src/de/j32/util/Util.java @@ -8,25 +8,29 @@ import java.util.Iterator; public class Util { - public static E nonnull(E ob) { + public static E nonnull(E ob) + { if (ob == null) throw new NullPointerException(); return ob; } public static void transfer(InputStream is, OutputStream os) - throws IOException { + throws IOException + { byte[] buffer = new byte[16384]; int len = -1; while ((len = is.read(buffer)) != -1) os.write(buffer, 0, len); } - public static void nothrowClose(Closeable c) { + public static void nothrowClose(Closeable c) + { if (c != null) { try { c.close(); - } catch (IOException e) {} + } + catch (IOException e) {} } }