Package okhttp3.mock
Class RoboResources
- java.lang.Object
-
- okhttp3.mock.RoboResources
-
public final class RoboResources extends java.lang.ObjectA helper class to provide responses from Roboelectric's sources
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.io.InputStreamasset(java.lang.String name)Loads the content from the given assetstatic java.io.InputStreamrawRes(int resource)Loads the content from the given raw resource
-
-
-
Method Detail
-
asset
public static java.io.InputStream asset(java.lang.String name)
Loads the content from the given asset- Parameters:
name- the name of the asset- Returns:
- the content as an
InputStream
-
rawRes
public static java.io.InputStream rawRes(@RawRes int resource)Loads the content from the given raw resource- Parameters:
resource- the id of the resource- Returns:
- the content as an
InputStream
-
-