Lines Matching refs:buf
144 ZFILE_read(ZFILE zfd, char *buf, jint nbytes) {
146 return (int) IO_Read(zfd, buf, nbytes);
156 return read(zfd, buf, nbytes);
185 * Reads len bytes of data into buf.
189 readFully(ZFILE zfd, void *buf, jlong len) {
190 char *bp = (char *) buf;
213 * Reads len bytes of data from the specified offset into buf.
217 readFullyAt(ZFILE zfd, void *buf, jlong len, jlong offset)
223 return readFully(zfd, buf, len);
289 char buf[4];
292 readFullyAt(zip->zfd, buf, sizeof(buf), cenpos) != -1 &&
293 GETSIG(buf) == CENSIG &&
294 readFullyAt(zip->zfd, buf, sizeof(buf), locpos) != -1 &&
295 GETSIG(buf) == LOCSIG);
307 char buf[READBLOCKSZ];
312 const jlong minPos = minHDR - (sizeof(buf)-ENDHDR);
315 for (pos = len - sizeof(buf); pos >= minPos; pos -= (sizeof(buf)-ENDHDR)) {
322 memset(buf, '\0', (size_t)off);
325 if (readFullyAt(zfd, buf + off, sizeof(buf) - off,
331 for (i = sizeof(buf) - ENDHDR; i >= 0; i--) {
332 if (buf[i+0] == 'P' &&
333 buf[i+1] == 'K' &&
334 buf[i+2] == '\005' &&
335 buf[i+3] == '\006' &&
336 ((pos + i + ENDHDR + ENDCOM(buf + i) == len)
337 || verifyEND(zip, pos + i, buf + i))) {
339 memcpy(endbuf, buf + i, ENDHDR);
760 char buf[PATH_MAX];
778 strcpy(buf, name);
779 JVM_NativePath(buf);
780 name = buf;
1284 ZIP_Read(jzfile *zip, jzentry *entry, jlong pos, void *buf, jint len)
1315 if (readFullyAt(zip->zfd, buf, len, start) == -1) {
1337 InflateFully(jzfile *zip, jzentry *entry, void *buf, char **msg)
1357 strm.next_out = buf;
1418 ZIP_ReadEntry(jzfile *zip, jzentry *entry, unsigned char *buf, char *entryname)
1435 n = ZIP_Read(zip, entry, pos, buf, count);
1443 buf += n;
1448 int ok = InflateFully(zip, entry, buf, &msg);