(InputStream in)
| 33 | } |
| 34 | |
| 35 | private static String readString(InputStream in) throws IOException { |
| 36 | int count = readInt(in); |
| 37 | byte[] b = new byte[count]; |
| 38 | int offset = 0; |
| 39 | int c; |
| 40 | while ((c = in.read(b, offset, b.length - offset)) != -1 |
| 41 | && offset < b.length) |
| 42 | { |
| 43 | offset += c; |
| 44 | } |
| 45 | if (offset != b.length) throw new EOFException(); |
| 46 | return new String(b); |
| 47 | } |
| 48 | |
| 49 | private static Record record(Map<Integer, Record> map, int key) { |
| 50 | Record r = map.get(key); |