(InputStream in)
| 68 | } |
| 69 | |
| 70 | public static byte[] read(InputStream in) throws IOException { |
| 71 | ByteArrayOutputStream bos = new ByteArrayOutputStream(); |
| 72 | transfer(in, bos); |
| 73 | return bos.toByteArray(); |
| 74 | } |
| 75 | |
| 76 | public static void write(OutputStream out, byte[] data) throws IOException { |
| 77 | if (data == null) { |