MCPcopy Create free account
hub / github.com/annmuor/jnode / readUntillNull

Method readUntillNull

jnode-core/src/jnode/ftn/FtnTools.java:221–232  ·  view source on GitHub ↗

Читаем пакет пока не встретим \0 @param is @return

(InputStream is)

Source from the content-addressed store, hash-verified

219 * @return
220 */
221 public static String readUntillNull(InputStream is) {
222 ByteArrayOutputStream bos = new ByteArrayOutputStream(1);
223 int b;
224 try {
225 while ((b = is.read()) != 0) {
226 bos.write(b);
227 }
228 } catch (IOException e) {
229 //
230 }
231 return new String(bos.toByteArray(), CP_866);
232 }
233
234 /**
235 * Превращает строки синбаев в лист 2D адресов

Callers 1

unpackMethod · 0.95

Calls 2

readMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected