MCPcopy Create free account
hub / github.com/demoth/jake2 / readString

Method readString

qcommon/src/main/java/jake2/qcommon/sizebuf_t.java:172–187  ·  view source on GitHub ↗

Read at most 2048 single byte characters

()

Source from the content-addressed store, hash-verified

170 * Read at most 2048 single byte characters
171 */
172 public String readString() {
173 // 2k read buffer.
174 byte[] readbuf = new byte[2048];
175 byte c;
176 int l = 0;
177 do {
178 c = (byte) readByte();
179 if (c == -1 || c == 0)
180 break;
181
182 readbuf[l] = c;
183 l++;
184 } while (l < 2047);
185
186 return new String(readbuf, 0, l);
187 }
188
189 public void writeCoord(float f) {
190 writeShort((int) (f * 8));

Callers 7

readAdapterMethod · 0.45
readMethod · 0.45
loadMethod · 0.45
readMethod · 0.45
readMethod · 0.45
readMethod · 0.45
testStringsMethod · 0.45

Calls 1

readByteMethod · 0.95

Tested by 1

testStringsMethod · 0.36