@Implements(value=android.net.Network.class, minSdk=21) public class ShadowNetwork extends java.lang.Object
| Constructor and Description | 
|---|
| ShadowNetwork() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected void | __constructor__(int netId) | 
| protected void | bindSocket(java.net.DatagramSocket socket)No-ops. | 
| protected void | bindSocket(java.io.FileDescriptor fd)No-ops. | 
| protected void | bindSocket(java.net.Socket socket)No-ops. | 
| int | getNetId()Allows to get the stored netId. | 
| static android.net.Network | newInstance(int netId)Creates new instance of  Network, because its constructor is hidden. | 
public static android.net.Network newInstance(int netId)
Creates new instance of Network, because its constructor is hidden.
netId - The netId.@Implementation protected void __constructor__(int netId)
@Implementation(minSdk=22) protected void bindSocket(java.net.DatagramSocket socket)
No-ops. We cannot assume that a Network represents a real network interface on the device running this test, so we have nothing to bind the socket to.
@Implementation protected void bindSocket(java.net.Socket socket)
No-ops. We cannot assume that a Network represents a real network interface on the device running this test, so we have nothing to bind the socket to.
@Implementation(minSdk=23) protected void bindSocket(java.io.FileDescriptor fd)
No-ops. We cannot assume that a Network represents a real network interface on the device running this test, so we have nothing to bind the socket to.
public int getNetId()
Allows to get the stored netId.