Package okhttp3.mock
Class ClasspathResources
- java.lang.Object
-
- okhttp3.mock.ClasspathResources
-
public final class ClasspathResources extends java.lang.ObjectA helper class to provide responses from classpath sources
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.io.InputStreamresource(java.lang.ClassLoader classLoader, java.lang.String name)Loads the content from the given classpath resourcestatic java.io.InputStreamresource(java.lang.String name)Loads the content from the given classpath resource
-
-
-
Method Detail
-
resource
public static java.io.InputStream resource(java.lang.String name)
Loads the content from the given classpath resource- Parameters:
name- the name of the resource- Returns:
- the content as an
InputStream
-
resource
public static java.io.InputStream resource(java.lang.ClassLoader classLoader, java.lang.String name)Loads the content from the given classpath resource- Parameters:
classLoader- the base classloadername- the name of the resource- Returns:
- the content as an
InputStream
-
-