private static byte[] readFully(InputStream is) throws IOException { try (TemporaryBuffer b = new TemporaryBuffer.Heap(Integer.MAX_VALUE)) { b.copy(is); return b.toByteArray(); } }
private static byte[] readFully(InputStream is) throws IOException { try (TemporaryBuffer b = new TemporaryBuffer.Heap(Integer.MAX_VALUE)) { b.copy(is); return b.toByteArray(); } }
private static byte[] readFully(final InputStream is) throws IOException { TemporaryBuffer b = new TemporaryBuffer.Heap(Integer.MAX_VALUE); b.copy(is); b.close(); return b.toByteArray(); }