Home
last modified time | relevance | path

Searched refs:mode (Results 1 – 25 of 97) sorted by relevance

1234

/libcore/ojluni/src/main/java/sun/nio/fs/
DUnixFileModeAttribute.java49 int mode = 0; in toUnixMode() local
54 case OWNER_READ : mode |= UnixConstants.S_IRUSR; break; in toUnixMode()
55 case OWNER_WRITE : mode |= UnixConstants.S_IWUSR; break; in toUnixMode()
56 case OWNER_EXECUTE : mode |= UnixConstants.S_IXUSR; break; in toUnixMode()
57 case GROUP_READ : mode |= UnixConstants.S_IRGRP; break; in toUnixMode()
58 case GROUP_WRITE : mode |= UnixConstants.S_IWGRP; break; in toUnixMode()
59 case GROUP_EXECUTE : mode |= UnixConstants.S_IXGRP; break; in toUnixMode()
60 case OTHERS_READ : mode |= UnixConstants.S_IROTH; break; in toUnixMode()
61 case OTHERS_WRITE : mode |= UnixConstants.S_IWOTH; break; in toUnixMode()
62 case OTHERS_EXECUTE : mode |= UnixConstants.S_IXOTH; break; in toUnixMode()
[all …]
DUnixNativeDispatcher.java68 static int open(UnixPath path, int flags, int mode) throws UnixException { in open() argument
71 return open0(buffer.address(), flags, mode); in open()
76 private static native int open0(long pathAddress, int flags, int mode) in open0() argument
82 static int openat(int dfd, byte[] path, int flags, int mode) throws UnixException { in openat() argument
85 return openat0(dfd, buffer.address(), flags, mode); in openat()
90 private static native int openat0(int dfd, long pathAddress, int flags, int mode) in openat0() argument
101 static long fopen(UnixPath filename, String mode) throws UnixException { in fopen() argument
103 NativeBuffer modeBuffer = NativeBuffers.asNativeBuffer(Util.toBytes(mode)); in fopen()
165 static void mknod(UnixPath path, int mode, long dev) throws UnixException { in mknod() argument
168 mknod0(buffer.address(), mode, dev); in mknod() local
[all …]
DUnixFileSystemProvider.java178 int mode = UnixFileModeAttribute in newFileChannel() local
181 return UnixChannelFactory.newFileChannel(file, options, mode); in newFileChannel()
195 int mode = UnixFileModeAttribute in newAsynchronousFileChannel() local
200 .newAsynchronousFileChannel(file, options, mode, pool); in newAsynchronousFileChannel()
215 int mode = UnixFileModeAttribute in newByteChannel() local
218 return UnixChannelFactory.newFileChannel(file, options, mode); in newByteChannel()
284 for (AccessMode mode: modes) { in checkAccess()
285 switch (mode) { in checkAccess()
294 int mode = 0; in checkAccess() local
297 mode |= (r) ? R_OK : F_OK; in checkAccess()
[all …]
DUnixChannelFactory.java116 int mode) in newFileChannel() argument
136 FileDescriptor fdObj = open(dfd, path, pathForPermissionCheck, flags, mode); in newFileChannel()
148 int mode) in newFileChannel() argument
151 return newFileChannel(-1, path, null, options, mode); in newFileChannel()
159 int mode, in newAsynchronousFileChannel() argument
175 FileDescriptor fdObj = open(-1, path, null, flags, mode); in newAsynchronousFileChannel()
187 int mode) in open() argument
258 fd = openat(dfd, path.asByteArray(), oflags, mode); in open()
260 fd = UnixNativeDispatcher.open(path, oflags, mode); in open()
/libcore/ojluni/src/test/java/lang/invoke/
DExplicitCastArgumentsTest.java135 for (TestConversionMode mode : TestConversionMode.values()) { in testNullRef2Prim()
136 testConversion(mode, from.wrapperType(), in testNullRef2Prim()
157 for (TestConversionMode mode : TestConversionMode.values()) { in testRef2Prim()
160 testConversion(mode, from.wrapperType(), in testRef2Prim()
163 testConversion(mode, from.wrapperType(), in testRef2Prim()
186 for (TestConversionMode mode : TestConversionMode.values()) { in testPrim2Ref()
188 testConversion(mode, from.primitiveType(), in testPrim2Ref()
191 testConversion(mode, from.primitiveType(), in testPrim2Ref()
195 testConversion(mode, from.primitiveType(), in testPrim2Ref()
198 testConversion(mode, from.primitiveType(), in testPrim2Ref()
[all …]
DMethodHandlesCastFailureTest.java106 void testCastFailure(String mode, int okCount) throws Throwable { in testCastFailure() argument
108 if (verbosity > 2) System.out.println("mode="+mode); in testCastFailure()
111 if (mode.endsWith("/return")) { in testCastFailure()
112 if (mode.equals("unbox/return")) { in testCastFailure()
116 } else if (mode.equals("cast/return")) { in testCastFailure()
121 } else if (mode.endsWith("/argument")) { in testCastFailure()
123 if (mode.equals("unbox/argument")) { in testCastFailure()
126 } else if (mode.equals("cast/argument")) { in testCastFailure()
136 assertNotSame(mode, surprise, surprise0); in testCastFailure()
/libcore/luni/src/main/java/libcore/io/
DIoTracker.java29 private Mode mode = Mode.READ; field in IoTracker
40 public void trackIo(int byteCount, Mode mode) { in trackIo() argument
41 if (this.mode != mode) { in trackIo()
43 this.mode = mode; in trackIo()
DBlockGuardOs.java73 @Override public boolean access(String path, int mode) throws ErrnoException { in access() argument
76 return super.access(path, mode); in access()
80 @Override public void chmod(String path, int mode) throws ErrnoException { in chmod() argument
83 super.chmod(path, mode); in chmod()
173 @Override public void fchmod(FileDescriptor fd, int mode) throws ErrnoException { in fchmod() argument
175 super.fchmod(fd, mode); in fchmod()
254 @Override public void mkdir(String path, int mode) throws ErrnoException { in mkdir() argument
257 super.mkdir(path, mode); in mkdir()
261 @Override public void mkfifo(String path, int mode) throws ErrnoException { in mkfifo() argument
264 super.mkfifo(path, mode); in mkfifo()
[all …]
/libcore/ojluni/src/test/java/util/SequencedCollection/
DBasicMap.java204 boolean reverseMap(int mode) { return (mode & 1) != 0; } in reverseMap() argument
205 boolean reverseView(int mode) { return (mode & 2) != 0; } in reverseView() argument
206 boolean callLast(int mode) { return (mode & 4) != 0; } in callLast() argument
208 boolean refLast(int mode) { return reverseMap(mode) ^ reverseView(mode) ^ callLast(mode); } in refLast() argument
227 for (int mode = 0; mode < 8; mode++) { in viewRemoves()
229 … new Object[] { "LinkedHashMap", mode, load(new LinkedHashMap<>(), ORIGINAL), ORIGINAL }, in viewRemoves()
230 … new Object[] { "SimpleSortedMap", mode, load(new SimpleSortedMap<>(), ORIGINAL), ORIGINAL }, in viewRemoves()
231 new Object[] { "TreeMap", mode, load(new TreeMap<>(), ORIGINAL), ORIGINAL } in viewRemoves()
240 for (int mode = 0; mode < 8; mode++) { in emptyViewRemoves()
242 new Object[] { "LinkedHashMap", mode, new LinkedHashMap<>(), List.of() }, in emptyViewRemoves()
[all …]
DBasic.java289 boolean reverseList(int mode) { return (mode & 1) != 0; } in reverseList() argument
290 boolean reverseSub(int mode) { return (mode & 2) != 0; } in reverseSub() argument
291 boolean isReversed(int mode) { return reverseList(mode) ^ reverseSub(mode); } in isReversed() argument
293 List<String> applyMode(int mode, List<String> base) { in applyMode() argument
294 var list = reverseList(mode) ? base.reversed() : base; in applyMode()
296 return reverseSub(mode) ? sub.reversed() : sub; in applyMode()
311 for (int mode = 0; mode < 4; mode++) { in subListMods()
313 new Object[] { "ArrayList", mode, new ArrayList<>(ORIGINAL), ORIGINAL }, in subListMods()
314 new Object[] { "COWAL", mode, new CopyOnWriteArrayList<>(ORIGINAL), ORIGINAL }, in subListMods()
315 new Object[] { "LinkedList", mode, new LinkedList<>(ORIGINAL), ORIGINAL }, in subListMods()
[all …]
/libcore/luni/src/test/java/tests/security/cert/
DCertificateFactory2Test.java84 private void checkResult(CertificateFactory certFactory, boolean mode) in checkResult() argument
86 MyCertificateFactorySpi.putMode(mode); in checkResult()
97 if (!mode) { in checkResult()
101 if (mode) { in checkResult()
112 if (mode) { in checkResult()
116 if (!mode) { in checkResult()
156 if (mode) { in checkResult()
162 if (!mode) { in checkResult()
167 if (mode) { in checkResult()
181 public void GetInstance01(boolean mode) throws CertificateException, CRLException { in GetInstance01() argument
[all …]
/libcore/support/src/test/java/org/apache/harmony/security/tests/support/cert/
DMyCertificateFactorySpi.java50 private static boolean mode; field in MyCertificateFactorySpi
56 mode = true; in MyCertificateFactorySpi()
63 mode = newMode; in putMode()
117 if (mode) { in engineGenerateCertPath()
126 if (mode) { in engineGenerateCertPath()
134 if (!mode) { in engineGetCertPathEncodings()
/libcore/ojluni/src/main/java/java/lang/
DStackStreamFactory.java125 protected final long mode; field in StackStreamFactory.AbstractStackWalker
133 protected AbstractStackWalker(StackWalker walker, int mode) { in AbstractStackWalker() argument
134 this(walker, mode, Integer.MAX_VALUE); in AbstractStackWalker()
136 protected AbstractStackWalker(StackWalker walker, int mode, int maxDepth) { in AbstractStackWalker() argument
138 this.mode = toStackWalkMode(walker, mode); in AbstractStackWalker()
144 private int toStackWalkMode(StackWalker walker, int mode) { in toStackWalkMode() argument
145 int newMode = mode; in toStackWalkMode()
147 (mode & FILL_CLASS_REFS_ONLY) != FILL_CLASS_REFS_ONLY) in toStackWalkMode()
380 return callStackWalk(mode, 0, in beginStackWalk()
396 int endIndex = fetchStackFrames(mode, anchor, batchSize, in fetchStackFrames()
[all …]
DLiveStackFrameInfo.java42 private int mode = 0; field in LiveStackFrameInfo
62 if (mode != 0) { in toString()
64 if ((mode & MODE_INTERPRETED) == MODE_INTERPRETED) { in toString()
67 if ((mode & MODE_COMPILED) == MODE_COMPILED) { in toString()
/libcore/ojluni/src/main/java/java/io/
DRandomAccessFile.java83 private int mode; field in RandomAccessFile
151 public RandomAccessFile(String name, String mode) in RandomAccessFile() argument
154 this(name != null ? new File(name) : null, mode); in RandomAccessFile()
233 public RandomAccessFile(File file, String mode) in RandomAccessFile() argument
237 this(file, mode, /* setCloExecFlag= */ false); in RandomAccessFile()
248 public RandomAccessFile(File file, String mode, boolean setCloExecFlag) in RandomAccessFile() argument
252 if (mode.equals("r")) { in RandomAccessFile()
254 } else if (mode.startsWith("rw")) { in RandomAccessFile()
259 if (mode.length() > 2) { in RandomAccessFile()
260 if (mode.equals("rws")) { in RandomAccessFile()
[all …]
/libcore/ojluni/src/main/native/
Dio_util_md.c83 handleOpen(const char *path, int oflag, int mode) { in handleOpen() argument
85 RESTARTABLE(open64(path, oflag, mode), fd); in handleOpen()
216 int mode; in handleAvailable() local
223 mode = buf64.st_mode; in handleAvailable()
224 if (S_ISCHR(mode) || S_ISFIFO(mode) || S_ISSOCK(mode)) { in handleAvailable()
232 } else if (S_ISREG(mode)) { in handleAvailable()
DUnixFileSystem_md.c136 statMode(const char *path, int *mode) in statMode() argument
140 *mode = sb.st_mode; in statMode()
157 int mode; in Java_java_io_UnixFileSystem_getBooleanAttributes0() local
158 if (statMode(path, &mode)) { in Java_java_io_UnixFileSystem_getBooleanAttributes0()
159 int fmt = mode & S_IFMT; in Java_java_io_UnixFileSystem_getBooleanAttributes0()
210 int mode; in Java_java_io_UnixFileSystem_setPermission0() local
233 if (statMode(path, &mode)) { in Java_java_io_UnixFileSystem_setPermission0()
235 mode |= amode; in Java_java_io_UnixFileSystem_setPermission0()
237 mode &= ~amode; in Java_java_io_UnixFileSystem_setPermission0()
238 if (chmod(path, mode) >= 0) { in Java_java_io_UnixFileSystem_setPermission0()
[all …]
/libcore/ojluni/src/main/java/java/text/
DCollator.java407 private int decompositionMode_Java_ICU(int mode) { in decompositionMode_Java_ICU() argument
408 switch (mode) { in decompositionMode_Java_ICU()
414 throw new IllegalArgumentException("Bad mode: " + mode); in decompositionMode_Java_ICU()
417 private int decompositionMode_ICU_Java(int mode) { in decompositionMode_ICU_Java() argument
418 int javaMode = mode; in decompositionMode_ICU_Java()
419 switch (mode) { in decompositionMode_ICU_Java()
/libcore/ojluni/src/main/java/javax/crypto/
DNullCipherSpi.java48 public void engineSetMode(String mode) {} in engineSetMode() argument
69 protected void engineInit(int mode, Key key, SecureRandom random) {} in engineInit() argument
71 protected void engineInit(int mode, Key key, in engineInit() argument
75 protected void engineInit(int mode, Key key, in engineInit() argument
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/
DKeyPairGenerator2Test.java88 private void checkResult(KeyPairGenerator keyPairGen, int mode) in checkResult() argument
91 switch (mode) { in checkResult()
184 private void GetInstance01(int mode) throws NoSuchAlgorithmException, in GetInstance01() argument
205 .toUpperCase(), (mode <= 2 ? resAlg : alg).toUpperCase()); in GetInstance01()
207 checkResult(kpG, mode); in GetInstance01()
222 public void GetInstance02(int mode) throws NoSuchAlgorithmException, in GetInstance02() argument
266 .toUpperCase(), (mode <= 2 ? resAlg : alg).toUpperCase()); in GetInstance02()
269 checkResult(kpG, mode); in GetInstance02()
282 private void GetInstance03(int mode) throws NoSuchAlgorithmException, in GetInstance03() argument
313 .toUpperCase(), (mode <= 2 ? resAlg : alg).toUpperCase()); in GetInstance03()
[all …]
/libcore/luni/src/main/java/java/nio/
DNioUtils.java81 public static FileChannel newFileChannel(Closeable ioObject, FileDescriptor fd, int mode) { in newFileChannel() argument
82 boolean readable = (mode & O_ACCMODE) != O_WRONLY; in newFileChannel()
83 boolean writable = (mode & O_ACCMODE) != O_RDONLY; in newFileChannel()
/libcore/ojluni/src/main/java/java/util/concurrent/
DCompletableFuture.java453 abstract CompletableFuture<?> tryFire(int mode); in tryFire() argument
578 final CompletableFuture<T> postFire(CompletableFuture<?> a, int mode) { in postFire() argument
583 if (mode >= 0 && (r != null || a.result != null)) in postFire()
587 if (mode < 0) in postFire()
603 final CompletableFuture<V> tryFire(int mode) { in tryFire() argument
618 if (mode <= 0 && !claim()) in tryFire()
629 return d.postFire(a, mode); in tryFire()
675 final CompletableFuture<Void> tryFire(int mode) { in tryFire() argument
690 if (mode <= 0 && !claim()) in tryFire()
702 return d.postFire(a, mode); in tryFire()
[all …]
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/
DCipherThread.java34 private String mode = null; field in CipherThread
80 mode = getNextMode(); in launcher()
134 return mode; in getMode()
138 return "Alg name:" + algName + " Key:" + keyLength + " Mode:" + mode + in getCipherParameters()
/libcore/ojluni/src/test/java/nio/file/attribute/
DPosixFileAttributeViewTest.java54 static void testPermissions(Path file, String mode) throws IOException { in testPermissions() argument
55 System.out.format("change mode: %s\n", mode); in testPermissions()
56 Set<PosixFilePermission> perms = PosixFilePermissions.fromString(mode); in testPermissions()
99 String mode) in createWithPermissions() argument
102 Set<PosixFilePermission> requested = PosixFilePermissions.fromString(mode); in createWithPermissions()
105 System.out.format("create file with mode: %s\n", mode); in createWithPermissions()
116 System.out.format("create directory with mode: %s\n", mode); in createWithPermissions()
/libcore/tools/docs/crypto/
Drun_update_crypto_support.sh16 build/soong/soong_ui.bash --make-mode vogar dx
17 vogar --mode=activity libcore/tools/docs/crypto/src/java/libcore/java/security/ListProviders.java |…

1234