3 import java.io.Closeable;
4 import java.io.IOException;
5 import java.io.InputStream;
6 import java.io.OutputStream;
7 import java.util.Iterator;
11 public static <E> E nonnull(E ob) {
13 throw new NullPointerException();
17 public static void transfer(InputStream is, OutputStream os)
19 byte[] buffer = new byte[16384];
21 while ((len = is.read(buffer)) != -1)
22 os.write(buffer, 0, len);
25 public static void nothrowClose(Closeable c) {
29 } catch (IOException e) {}
33 public static <E> E first(Iterable<E> i)
35 Iterator<E> it = i.iterator();