Searched defs:fd (Results 1 - 25 of 59) sorted by relevance

123

/dalvik/dx/tests/083-ssa-phi-placement/
H A DBlort.java48 Object fd; field in class:Blort
51 if (fd == null) {
/dalvik/libcore/include/
H A DScopedFd.h22 // A smart pointer that closes the given fd on going out of scope.
23 // Use this when the fd is incidental to the purpose of your function,
27 explicit ScopedFd(int fd) : fd(fd) { argument
31 close(fd);
35 return fd;
39 int fd; member in class:ScopedFd
/dalvik/libcore/luni/src/main/java/java/io/
H A DFileReader.java46 * Construct a new FileReader on the given FileDescriptor {@code fd}. Since
50 * @param fd
53 public FileReader(FileDescriptor fd) { argument
54 super(new FileInputStream(fd));
H A DFileWriter.java62 * Creates a FileWriter using the existing FileDescriptor {@code fd}.
64 * @param fd
67 public FileWriter(FileDescriptor fd) { argument
68 super(new FileOutputStream(fd));
H A DFileOutputStream.java45 FileDescriptor fd; field in class:FileOutputStream
96 fd = new FileDescriptor();
97 fd.descriptor = fileSystem.open(file.pathBytes,
100 channel = FileChannelFactory.getFileChannel(this, fd.descriptor,
105 * Constructs a new FileOutputStream on the FileDescriptor {@code fd}. The
109 * @param fd
112 * if {@code fd} is {@code null}.
118 public FileOutputStream(FileDescriptor fd) { argument
120 if (fd == null) {
125 security.checkWrite(fd);
[all...]
H A DFileInputStream.java42 FileDescriptor fd; field in class:FileInputStream
80 fd = new FileDescriptor();
81 fd.readOnly = true;
82 fd.descriptor = fileSystem.open(file.pathBytes, IFileSystem.O_RDONLY);
85 // channel = FileChannelFactory.getFileChannel(this, fd.descriptor,
92 * {@code fd}. The file must already be open, therefore no
95 * @param fd
98 * if {@code fd} is {@code null}.
103 public FileInputStream(FileDescriptor fd) { argument
105 if (fd
[all...]
H A DRandomAccessFile.java41 private FileDescriptor fd; field in class:RandomAccessFile
116 fd = new FileDescriptor();
120 fd.readOnly = true;
145 fd.descriptor = fileSystem.open(file.pathBytes, options);
147 // channel = FileChannelFactory.getFileChannel(this, fd.descriptor,
154 fd.sync();
202 if (fd != null && fd.descriptor >= 0) {
203 fileSystem.close(fd.descriptor);
204 fd
[all...]
/dalvik/libcore/luni/src/main/java/org/apache/harmony/luni/net/
H A DPlainServerSocketImpl.java36 public PlainServerSocketImpl(FileDescriptor fd) { argument
38 this.fd = fd;
45 netImpl.createServerStreamSocket(fd, NetUtil.preferIPv4Stack());
47 netImpl.createDatagramSocket(fd, NetUtil.preferIPv4Stack());
/dalvik/libcore/nio/src/main/java/org/apache/harmony/nio/
H A DFileChannelFactory.java38 public static FileChannel getFileChannel(Object stream, int fd, int mode) { argument
41 return new ReadOnlyFileChannel(stream, fd);
43 return new WriteOnlyFileChannel(stream, fd);
45 return new ReadWriteFileChannel(stream, fd);
47 return new ReadWriteFileChannel(stream, fd);
49 return new WriteOnlyFileChannel(stream, fd, true);
/dalvik/libdex/
H A DOptInvocation.c113 * "fd" must be positioned at the start of the file. On return, it will
119 int dexOptCreateEmptyHeader(int fd) argument
124 assert(lseek(fd, 0, SEEK_CUR) == 0);
134 actual = write(fd, &optHdr, sizeof(optHdr));
H A DCmdUtils.c42 int fd = -1; local
53 fd = open(outFileName, O_WRONLY | O_CREAT | O_EXCL, 0600);
54 if (fd < 0) {
73 if (!dexZipExtractEntryToFile(&archive, entry, fd)) {
81 if (fd >= 0)
82 close(fd);
109 int fd = -1; local
156 fd = open(fileName, O_RDONLY);
157 if (fd < 0) {
165 if (sysMapFileInShmemReadOnly(fd, pMa
[all...]
H A DSysUtil.c87 static int getFileStartAndLength(int fd, off_t *start_, size_t *length_) argument
95 start = lseek(fd, 0L, SEEK_CUR);
96 end = lseek(fd, 0L, SEEK_END);
97 (void) lseek(fd, start, SEEK_SET);
118 * everything from fd's current offset on.
123 int sysLoadFileInShmem(int fd, MemMapping* pMap) argument
132 if (getFileStartAndLength(fd, &start, &length) < 0)
139 actual = read(fd, memPtr, length);
157 int sysFakeMapFile(int fd, MemMapping* pMap) argument
169 if (getFileStartAndLength(fd,
193 sysMapFileInShmemReadOnly(int fd, MemMapping* pMap) argument
232 sysMapFileInShmemWritableReadOnly(int fd, MemMapping* pMap) argument
275 sysMapFileSegmentInShmem(int fd, off_t start, long length, MemMapping* pMap) argument
[all...]
/dalvik/libnativehelper/include/nativehelper/
H A DJNIHelp.h80 * Create a java.io.FileDescriptor given an integer fd
82 jobject jniCreateFileDescriptor(C_JNIEnv* env, int fd);
127 inline jobject jniCreateFileDescriptor(JNIEnv* env, int fd) argument
129 return jniCreateFileDescriptor(&env->functions, fd);
/dalvik/libcore/luni/src/main/java/org/apache/harmony/luni/platform/
H A DPlatformAddressFactory.java106 public static PlatformAddress allocMap(int fd, long start, long size, int mode) throws IOException { argument
112 int osAddress = PlatformAddress.osMemory.mmap(fd, start, size, mode);
/dalvik/libcore/luni/src/main/native/
H A Djava_io_FileDescriptor.c91 int fd = getFd(env, obj); local
93 if (fsync(fd) != 0) {
95 * If fd is a socket, then fsync(fd) is defined to fail with
143 * Create a java.io.FileDescriptor given an integer fd
146 jobject jniCreateFileDescriptor (JNIEnv *env, int fd) { argument
157 (*env)->SetIntField(env, ret, gCachedFields.descriptor, fd);
H A Difaddrs-android.h74 ScopedFd fd(socket(AF_INET, SOCK_DGRAM, 0));
75 if (fd.get() == -1) {
81 int rc = ioctl(fd.get(), SIOCGIFFLAGS, &ifr);
113 inline bool sendNetlinkMessage(int fd, const void* data, size_t byteCount) { argument
114 ssize_t sentByteCount = TEMP_FAILURE_RETRY(send(fd, data, byteCount, 0));
118 inline ssize_t recvNetlinkMessage(int fd, char* buf, size_t byteCount) { argument
119 return TEMP_FAILURE_RETRY(recv(fd, buf, byteCount, 0));
128 ScopedFd fd(socket(PF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE));
129 if (fd.get() < 0) {
141 if (!sendNetlinkMessage(fd
[all...]
/dalvik/vm/
H A DDvmDex.c117 int dvmDexFileOpenFromFd(int fd, DvmDex** ppDvmDex) argument
128 if (lseek(fd, 0, SEEK_SET) < 0) {
133 if (sysMapFileInShmemWritableReadOnly(fd, &memMap) != 0) {
H A DSignalCatcher.c77 int fd = -1; local
79 fd = open("/proc/self/cmdline", O_RDONLY, 0);
80 if (fd < 0)
86 actual = read(fd, tmpBuf, sizeof(tmpBuf)-1);
94 if (fd >= 0)
95 close(fd);
192 int fd = open(gDvm.stackTraceFile, O_WRONLY | O_APPEND | O_CREAT, 0666); local
193 if (fd < 0) {
197 ssize_t actual = write(fd, traceBuf, traceLen);
205 close(fd);
[all...]
H A DJarFile.c50 int fd = -1; local
69 fd = open(buf, flags);
70 if (fd >= 0) {
72 return fd;
88 int fd; local
122 fd = dvmOpenCachedDexFile(fileName, cachedName,
126 LOGV("dvmOpenCachedDexFile returned fd %d\n", fd);
127 if (fd < 0) {
135 if (!dvmUnlockCachedDexFile(fd)) {
194 int fd = -1; local
[all...]
H A DStdioConverter.c50 static bool readAndLog(int fd, BufferedData* data, const char* tag);
227 * Data is pending on "fd". Read as much as will fit in "data", then
230 static bool readAndLog(int fd, BufferedData* data, const char* tag) argument
238 actual = read(fd, data->buf + data->count, want);
241 tag, fd, want, (int)actual, strerror(errno));
/dalvik/libcore/luni/src/main/java/java/net/
H A DDatagramSocketImpl.java34 protected FileDescriptor fd; field in class:DatagramSocketImpl
84 return fd;
93 return Platform.getNetworkSystem().getSocketLocalAddress(fd);
/dalvik/libcore/nio/src/main/java/org/apache/harmony/nio/internal/
H A DServerSocketChannelImpl.java58 // The fd to interact with native code
59 private final FileDescriptor fd; field in class:ServerSocketChannelImpl
81 fd = new FileDescriptor();
82 Platform.getNetworkSystem().createStreamSocket(fd,
84 impl = new PlainServerSocketImpl(fd);
93 fd = new FileDescriptor();
94 impl = new PlainServerSocketImpl(fd);
133 new FileDescriptor[] { this.fd },
188 return fd;
/dalvik/dexopt/
H A DOptMain.c201 * 2. zip fd (input, read-only)
202 * 3. cache fd (output, read-write, locked with flock)
233 GET_ARG(zipFd, strtol, "bad zip fd");
234 GET_ARG(cacheFd, strtol, "bad cache fd");
319 int fd, flags, vmBuildVersion; local
344 GET_ARG(fd, strtol, "bad fd");
353 LOGV("Args: fd=%d off=%ld len=%ld name='%s' mod=0x%x crc=0x%x flg=%d (argc=%d)\n",
354 fd, offset, length, debugFileName, modWhen, crc, flags, argc);
425 if (!dvmContinueOptimization(fd, offse
[all...]
/dalvik/libcore/archive/src/main/java/java/util/zip/
H A DInflater.java401 * @param fd
409 synchronized int setFileInput(FileDescriptor fd, long off, int nbytes) { argument
414 inLength = setFileInputImpl(fd, off, nbytes, streamHandle);
423 private native synchronized int setFileInputImpl(FileDescriptor fd, long off, argument
/dalvik/libcore/archive/src/main/native/
H A Djava_util_zip_Inflater.c149 int fd = jniGetFDFromFileDescriptor(env, javaFileDescriptor); local
150 lseek(fd, off, SEEK_SET);
151 int cnt = read(fd, stream->inaddr, len);

Completed in 432 milliseconds

123