小编roc*_*ree的帖子

Android: Can't Read From File using FileInputStream

I'm trying to read from a file called "quiz_questions.txt" in my res/raw folder. The code I have compiles, but it looks like it stops before it gets to the FileInputStream. Maybe it is opening it, but not reading it. I'm not sure.

import java.io.*;
import android.app.Activity;
import android.content.Context;
import android.content.res.Resources;

public class Questions extends Activity {

public String[][] questions = new String[10][5];

public void fillArray() {
    {
        Context con = null;
        try {
            //fis = new BufferedInputStream(new FileInputStream("res/raw/quiz_questions.txt"));
            FileInputStream fis …
Run Code Online (Sandbox Code Playgroud)

java android fileinputstream

7
推荐指数
1
解决办法
9074
查看次数

标签 统计

android ×1

fileinputstream ×1

java ×1