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