📜  将短视频更改为字节数组 android - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:23.202000             🧑  作者: Mango

代码示例1
ByteArrayOutputStream baos = new ByteArrayOutputStream();
FileInputStream fis = new FileInputStream(new File(yourUri));

byte[] buf = new byte[1024];
int n;
while (-1 != (n = fis.read(buf)))
    baos.write(buf, 0, n);

byte[] videoBytes = baos.toByteArray();