Lines Matching refs:buf
170 static int unpackInt(byte[] buf, int offset) {
173 b0 = ((int) buf[offset]) & 0xFF; // mask against sign extension
174 b1 = ((int) buf[offset+1]) & 0xFF;
175 b2 = ((int) buf[offset+2]) & 0xFF;
176 b3 = ((int) buf[offset+3]) & 0xFF;
200 final byte[] buf = new byte[4096];
209 int headerBytes = readExactly(fd, buf, 0, 8);
216 int pid = unpackInt(buf, 0);
217 int signal = unpackInt(buf, 4);
240 bytes = Os.read(fd, buf, 0, buf.length);
243 String s = new String(buf, 0, bytes, "UTF-8");
247 if (buf[bytes-1] == 0) {
248 os.write(buf, 0, bytes-1); // exclude the EOD token
252 os.write(buf, 0, bytes);