MCPcopy Create free account
hub / github.com/ReadyTalk/avian / readString

Method readString

test/extra/QueryDump.java:35–47  ·  view source on GitHub ↗
(InputStream in)

Source from the content-addressed store, hash-verified

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);

Callers 1

readMethod · 0.95

Calls 2

readIntMethod · 0.95
readMethod · 0.65

Tested by

no test coverage detected