get Asset Input Stream - Android App

Android examples for App:Assets

Description

get Asset Input Stream

Demo Code


//package com.java2s;
import java.io.IOException;
import java.io.InputStream;
import android.content.Context;

public class Main {
    public static InputStream getAssetInputStream(String assetFileName,
            Context context) throws IOException {
        InputStream inputStream = context.getAssets().open(assetFileName);
        return inputStream;
    }/*from w  w w  .  j  av a 2  s  .com*/
}

Related Tutorials