✍️
HOME
  • Introduction
  • Android
    • 基础
      • 文件读写
      • View
      • ViewGroup
      • Drawable
        • Shape
        • Selector
      • RecycleView
      • Databinding
    • Android Studio Git使用教程
    • Android Studio 版本更新历史
    • Maven 依赖管理
  • Linux
    • Linux系统安装
    • Linux 基础知识
    • Linux 服务器维护
    • 树莓派
    • Ubuntu
    • CDLinux
    • Shell Auto
    • 酸酸乳好喝
    • 后台运行
    • FRP
    • V +
  • Mac
    • Mac 版迅雷去广告
    • Homebrew 管理应用
    • 装机必备
  • Web
    • 前端环境搭建
    • 特殊需求
    • Python
  • Dev
    • Git 常用命令
    • Git submodule 和 subtree
    • GitBook
    • 软件问题处理
Powered by GitBook
On this page
  • Asset
  • Resource
  • File
  • JavaPackage

Was this helpful?

  1. Android
  2. 基础

文件读写

Asset

context.getAssets().open(path);
context.getAssets().openFd(path);

Resource

context.getResources().openRawResource(id);
context.getResources().openRawResourceFd(id);

File

FileInputStream inputStream = new FileInputStream(path);
FileOutputStream outputStream = new FileOutputStream(path);
inputStream.getFD();
outputStream.getFD();

JavaPackage

Previous基础NextView

Last updated 4 years ago

Was this helpful?