Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import java.io.InputStream;

public class Main {
    /**
     * Returns an InputStream for the given test class and sub-path.
     *
     * @param testClass A Junit test class.
     * @param subPath   The sub-path under androidTest/resources where the desired resource is
     *                  located. Should not be prefixed with a '/'
     */
    public static InputStream openResource(Class testClass, String subPath) {
        return testClass.getResourceAsStream("/" + subPath);
    }
}