package cucumber.runtime.android;

import android.content.Context;
import android.content.res.AssetManager;
import cucumber.runtime.io.Resource;

import java.io.IOException;
import java.io.InputStream;

class AndroidResource implements Resource {
    private final Context context;
    private final String path;

    public AndroidResource(Context context, String path) {
        this.context = context;
        this.path = path;
    }

    @Override
    public String getPath() {
        return path;
    }

    @Override
    public InputStream getInputStream() throws IOException {
        return context.getAssets().open(path, AssetManager.ACCESS_UNKNOWN);
    }

    @Override
    public String getClassName() {
        return path.substring(path.lastIndexOf("/"));
    }

    @Override
    public String toString() {
        return "AndroidResource (" + path + ")";
    }
}

@@ -706,16 +706,32 @@
 assName(
+String extension
 ) %7B%0A    
@@ -760,29 +760,63 @@
 ing(
+0, 
 path.l
-astIndexOf(%22/%22)
+ength() - extension.length()).replace('/', '.'
 );%0A 

Fix build - AndroidResource implements new Resource API