将InputStream转换为byte数组

感受不难,但用的时候一时半会写不出来,浪费时间,因而记录下来。 public static byte[] read(InputStream inputStream) throws IOException { try { ByteArrayOutputStream baos = new ByteArrayOutputStream();
相关文章
相关标签/搜索