@Test public void testEmpty() throws Exception { InputStream is = new ByteArrayInputStream(new byte[0]); byte[] bytes = IoUtils.toByteArray(is); assertEquals(0, bytes.length); }
public static byte[] toByteArray(InputStream in) throws IOException { ByteArrayOutputStream out = new ByteArrayOutputStream(); copy(in, out); return out.toByteArray(); }
IoUtils { public static byte[] toByteArray(InputStream in) throws IOException { ByteArrayOutputStream out = new ByteArrayOutputStream(); copy(in, out); return out.toByteArray(); } }
IoUtils { public static byte[] toByteArray(InputStream in) throws IOException { ByteArrayOutputStream out = new ByteArrayOutputStream(); copy(in, out); return out.toByteArray(); }  }
IoUtils { public static byte[] toByteArray(InputStream in) throws IOException { ByteArrayOutputStream out = new ByteArrayOutputStream(); copy(in, out); return out.toByteArray(); }  static byte[] toByteArray(InputStream in); static long copy(InputStream from, OutputStream to); }
IoUtils { public static byte[] toByteArray(InputStream in) throws IOException { ByteArrayOutputStream out = new ByteArrayOutputStream(); copy(in, out); return out.toByteArray(); }  static byte[] toByteArray(InputStream in); static long copy(InputStream from, OutputStream to);  }