Lines Matching refs:buf
165 static int unpackInt(byte[] buf, int offset) {
168 b0 = ((int) buf[offset]) & 0xFF; // mask against sign extension
169 b1 = ((int) buf[offset+1]) & 0xFF;
170 b2 = ((int) buf[offset+2]) & 0xFF;
171 b3 = ((int) buf[offset+3]) & 0xFF;
195 final byte[] buf = new byte[4096];
208 int headerBytes = readExactly(fd, buf, 0, 8);
215 int pid = unpackInt(buf, 0);
216 int signal = unpackInt(buf, 4);
239 bytes = Os.read(fd, buf, 0, buf.length);
242 String s = new String(buf, 0, bytes, "UTF-8");
246 if (buf[bytes-1] == 0) {
247 os.write(buf, 0, bytes-1); // exclude the EOD token
251 os.write(buf, 0, bytes);