load Asset String - Android android.content

Android examples for android.content:Asset

Description

load Asset String

Demo Code

import android.content.res.Resources;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

public class Main{

    public static String loadAssetString(Resources res, String filename)
            throws IOException {
        InputStream is = res.getAssets().open(filename);
        return loadString(is);
    }// www .java  2s.co  m

}

Related Tutorials