往输出流中写入一行字节码 @param out 输出流 @param line 一行字节码 @throws IOException I/O 异常
(OutputStream out, byte[] line)
| 59 | * @throws IOException I/O 异常 |
| 60 | */ |
| 61 | public static void writeln(OutputStream out, byte[] line) throws IOException { |
| 62 | if (line == null) { |
| 63 | return; |
| 64 | } |
| 65 | out.write(line); |
| 66 | out.write('\r'); |
| 67 | out.write('\n'); |
| 68 | } |
| 69 | |
| 70 | public static byte[] read(InputStream in) throws IOException { |
| 71 | ByteArrayOutputStream bos = new ByteArrayOutputStream(); |