load Raw Resource String - Android android.content.res

Android examples for android.content.res:Resources

Description

load Raw Resource 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 loadRawResourceString(Resources res, int resourceId)
            throws IOException {
        InputStream is = res.openRawResource(resourceId);
        return loadString(is);
    }//from  www . j  a va2  s.  co  m

}

Related Tutorials