Lines Matching refs:mode
482 * @param mode May be "w", "wa", "rw", or "rwt".
487 public final OutputStream openOutputStream(Uri uri, String mode)
489 AssetFileDescriptor fd = openAssetFileDescriptor(uri, mode);
517 * @param mode The file mode to use, as per {@link ContentProvider#openFile
522 * file exists under the URI or the mode is invalid.
526 String mode) throws FileNotFoundException {
527 AssetFileDescriptor afd = openAssetFileDescriptor(uri, mode);
582 * <p>Note that if this function is called for read-only input (mode is "r")
588 * @param mode The file mode to use, as per {@link ContentProvider#openAssetFile
593 * file exists under the URI or the mode is invalid.
596 String mode) throws FileNotFoundException {
599 if (!"r".equals(mode)) {
610 new File(uri.getPath()), modeToMode(uri, mode));
613 if ("r".equals(mode)) {
625 fd = unstableProvider.openAssetFile(uri, mode);
639 fd = stableProvider.openAssetFile(uri, mode);
822 static public int modeToMode(Uri uri, String mode) throws FileNotFoundException {
824 if ("r".equals(mode)) {
826 } else if ("w".equals(mode) || "wt".equals(mode)) {
830 } else if ("wa".equals(mode)) {
834 } else if ("rw".equals(mode)) {
837 } else if ("rwt".equals(mode)) {
842 throw new FileNotFoundException("Bad mode for " + uri + ": "
843 + mode);