(InputStream is)
| 3080 | } |
| 3081 | |
| 3082 | static byte[] readBytes(InputStream is) throws IOException { |
| 3083 | ByteArrayOutputStream os = new ByteArrayOutputStream(Math.max(BUFFER_SIZE, is.available())); |
| 3084 | byte[] buffer = new byte[BUFFER_SIZE]; |
| 3085 | for (int len = is.read(buffer); len != -1; len = is.read(buffer)) |
| 3086 | os.write(buffer, 0, len); |
| 3087 | return os.toByteArray(); |
| 3088 | } |
| 3089 | |
| 3090 | public static String readLine(InputStream is, Charset charset) throws IOException { |
| 3091 | ByteArrayOutputStream bos = new ByteArrayOutputStream(); |
no test coverage detected