public class

WebServerDispatcher.Resource

extends java.lang.Object

 java.lang.Object

↳androidx.media3.test.utils.WebServerDispatcher.Resource

Overview

A resource served by WebServerDispatcher.

Summary

Fields
public static final intGZIP_SUPPORT_DISABLED

The server doesn't support gzip.

public static final intGZIP_SUPPORT_ENABLED

The server supports gzip.

public static final intGZIP_SUPPORT_FORCED

The server supports gzip.

Methods
public WebServerDispatcher.Resource.BuilderbuildUpon()

Returns a new WebServerDispatcher.Resource.Builder initialized with the values from this instance.

public byte[]getData()

Returns the data served by this resource.

public intgetGzipSupport()

Returns the level of gzip support the server should provide for this resource.

public java.lang.StringgetPath()

Returns the path this resource is available at.

public booleanresolvesToUnknownLength()

Returns true if the resource should resolve to an unknown length.

public booleansupportsRangeRequests()

Returns true if RFC 7233 range requests should be supported for this resource.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Fields

public static final int GZIP_SUPPORT_DISABLED

The server doesn't support gzip.

public static final int GZIP_SUPPORT_ENABLED

The server supports gzip. Responses are only compressed if the request signals "gzip" is an acceptable content-coding using an Accept-Encoding header.

public static final int GZIP_SUPPORT_FORCED

The server supports gzip. Responses are compressed if the request contains no Accept-Encoding header or one that accepts "gzip".

RFC 2616 14.3 recommends a server use "identity" content-coding if no Accept-Encoding is present, but some servers will still compress responses in this case. This option mimics that behaviour.

Methods

public java.lang.String getPath()

Returns the path this resource is available at.

public byte[] getData()

Returns the data served by this resource.

public boolean supportsRangeRequests()

Returns true if RFC 7233 range requests should be supported for this resource.

public boolean resolvesToUnknownLength()

Returns true if the resource should resolve to an unknown length.

public int getGzipSupport()

Returns the level of gzip support the server should provide for this resource.

Returns a new WebServerDispatcher.Resource.Builder initialized with the values from this instance.