Lines Matching refs:zfd
135 ZFILE_Close(ZFILE zfd) {
137 CloseHandle((HANDLE) zfd);
139 JVM_Close(zfd);
144 ZFILE_read(ZFILE zfd, char *buf, jint nbytes) {
146 return (int) IO_Read(zfd, buf, nbytes);
156 return read(zfd, buf, nbytes);
189 readFully(ZFILE zfd, void *buf, jlong len) {
197 jint n = ZFILE_read(zfd, bp, count);
217 readFullyAt(ZFILE zfd, void *buf, jlong len, jlong offset)
219 if (IO_Lseek(zfd, offset, SEEK_SET) == -1) {
223 return readFully(zfd, buf, len);
237 zip->zfd = -1;
271 if (zip->zfd != -1) ZFILE_Close(zip->zfd);
292 readFullyAt(zip->zfd, buf, sizeof(buf), cenpos) != -1 &&
294 readFullyAt(zip->zfd, buf, sizeof(buf), locpos) != -1 &&
310 const ZFILE zfd = zip->zfd;
325 if (readFullyAt(zfd, buf + off, sizeof(buf) - off,
347 if (readFullyAt(zfd, zip->comment, clen, pos + i + ENDHDR)
386 if (readFullyAt(zip->zfd, loc64, ZIP64_LOCHDR, endpos - ZIP64_LOCHDR) == -1) {
390 if (readFullyAt(zip->zfd, end64buf, ZIP64_ENDHDR, end64pos) == -1) {
627 mappedAddr = mmap64(0, zip->mlen, PROT_READ, MAP_SHARED, zip->zfd, (off64_t) offset);
641 (readFullyAt(zip->zfd, cenbuf, cenlen, cenpos) == -1))
744 ZFILE zfd = ZFILE_Open(name, mode);
745 zip = ZIP_Put_In_Cache(name, zfd, pmsg, lastModified);
804 ZIP_Put_In_Cache(const char *name, ZFILE zfd, char **pmsg, jlong lastModified)
806 return ZIP_Put_In_Cache0(name, zfd, pmsg, lastModified, JNI_TRUE);
810 ZIP_Put_In_Cache0(const char *name, ZFILE zfd, char **pmsg, jlong lastModified,
827 if (zfd == -1) {
834 // Assumption, zfd refers to start of file. Trivially, reuse errbuf.
835 if (readFully(zfd, errbuf, 4) != -1) { // errors will be handled later
842 len = zip->len = IO_Lseek(zfd, 0, SEEK_END);
852 ZFILE_Close(zfd);
857 zip->zfd = zfd;
932 ZFILE zfd = zip->zfd;
937 if (readFullyAt(zfd, cen, bufsize, cenpos) == -1) goto Catch;
941 if (readFully(zfd, cen+bufsize, censize-bufsize) == -1) goto Catch;
1261 if (readFullyAt(zip->zfd, loc, LOCHDR, -(entry->pos)) == -1) {
1315 if (readFullyAt(zip->zfd, buf, len, start) == -1) {