(char[] arr, InputStream in)
| 294 | |
| 295 | //data storage |
| 296 | public static void read(char[] arr, InputStream in) throws IOException { |
| 297 | int len = arr.length; |
| 298 | byte[] buf = new byte[len * 2]; |
| 299 | in.read(buf); |
| 300 | for (int i = 0; i < len; i++) { |
| 301 | arr[i] = (char) ((buf[i * 2] & 0xff) | ((buf[i * 2 + 1] << 8) & 0xff00)); |
| 302 | } |
| 303 | } |
| 304 | |
| 305 | public static void read(int[] arr, InputStream in) throws IOException { |
| 306 | int len = arr.length; |
no outgoing calls
no test coverage detected