Lines Matching defs:mode
404 * @param mode May be "w", "wa", "rw", or "rwt".
409 public final OutputStream openOutputStream(Uri uri, String mode)
411 AssetFileDescriptor fd = openAssetFileDescriptor(uri, mode);
439 * @param mode The file mode to use, as per {@link ContentProvider#openFile
444 * file exists under the URI or the mode is invalid.
448 String mode) throws FileNotFoundException {
449 AssetFileDescriptor afd = openAssetFileDescriptor(uri, mode);
504 * <p>Note that if this function is called for read-only input (mode is "r")
510 * @param mode The file mode to use, as per {@link ContentProvider#openAssetFile
515 * file exists under the URI or the mode is invalid.
518 String mode) throws FileNotFoundException {
521 if (!"r".equals(mode)) {
532 new File(uri.getPath()), modeToMode(uri, mode));
535 if ("r".equals(mode)) {
543 AssetFileDescriptor fd = provider.openAssetFile(uri, mode);
686 static public int modeToMode(Uri uri, String mode) throws FileNotFoundException {
688 if ("r".equals(mode)) {
690 } else if ("w".equals(mode) || "wt".equals(mode)) {
694 } else if ("wa".equals(mode)) {
698 } else if ("rw".equals(mode)) {
701 } else if ("rwt".equals(mode)) {
706 throw new FileNotFoundException("Bad mode for " + uri + ": "
707 + mode);