(InputStream inputStream)
| 59 | } |
| 60 | |
| 61 | public static String toString(InputStream inputStream) throws IOException { |
| 62 | BufferedInputStream bis = new BufferedInputStream(inputStream); |
| 63 | ByteArrayOutputStream buf = new ByteArrayOutputStream(); |
| 64 | for (int result = bis.read(); result != -1; result = bis.read()) { |
| 65 | buf.write((byte) result); |
| 66 | } |
| 67 | return buf.toString(); |
| 68 | } |
| 69 | |
| 70 | public static void logByteArray(byte[] array) { |
| 71 | ByteBuf b = Unpooled.wrappedBuffer(array); |
no test coverage detected