Back to Exoplayer

DataSourceContractTest.TestResource.Builder (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/testutil/DataSourceContractTest.TestResource.Builder.html

latest3.7 KB
Original Source

Package com.google.android.exoplayer2.testutil

Class DataSourceContractTest.TestResource.Builder


public static final classDataSourceContractTest.TestResource.Builderextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")

Builder for DataSourceContractTest.TestResource instances.

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | Builder() | |

Method Summary

All Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description | | --- | --- | --- | | DataSourceContractTest.TestResource | build() | | | DataSourceContractTest.TestResource.Builder | setExpectedBytes​(byte[] expectedBytes) | Sets the expected contents of this resource. | | DataSourceContractTest.TestResource.Builder | setName​(String name) | Sets a human-readable name for this resource which will be shown in test failure messages. | | DataSourceContractTest.TestResource.Builder | setUri​(Uri uri) | Sets the URI where this resource is located. | | DataSourceContractTest.TestResource.Builder | setUri​(String uri) | Sets the URI where this resource is located. |

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

- 

Builder

public Builder()

Method Detail

- 

setName

@CanIgnoreReturnValue
public[DataSourceContractTest.TestResource.Builder](DataSourceContractTest.TestResource.Builder.html "class in com.google.android.exoplayer2.testutil")setName​([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")name)

Sets a human-readable name for this resource which will be shown in test failure messages.

- 

setUri

@CanIgnoreReturnValue
public[DataSourceContractTest.TestResource.Builder](DataSourceContractTest.TestResource.Builder.html "class in com.google.android.exoplayer2.testutil")setUri​([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")uri)

Sets the URI where this resource is located.

- 

setUri

@CanIgnoreReturnValue
public[DataSourceContractTest.TestResource.Builder](DataSourceContractTest.TestResource.Builder.html "class in com.google.android.exoplayer2.testutil")setUri​([Uri](https://developer.android.com/reference/android/net/Uri.html "class or interface in android.net")uri)

Sets the URI where this resource is located.

- 

setExpectedBytes

@CanIgnoreReturnValue
public[DataSourceContractTest.TestResource.Builder](DataSourceContractTest.TestResource.Builder.html "class in com.google.android.exoplayer2.testutil")setExpectedBytes​(byte[] expectedBytes)

Sets the expected contents of this resource.

Must be at least 5 bytes.

- 

build

public[DataSourceContractTest.TestResource](DataSourceContractTest.TestResource.html "class in com.google.android.exoplayer2.testutil")build()