Move DefaultHttpDataSource request header explanation to class Javadoc.

The Javadoc for open() won't be read by anyone because it's an overridden method
of the interface and not called directly from application code.

Move doc to class documentation as this is a generic explanation about the
functionality of the class. Also added "all" to clarify that all the parameters
will be added and the order of preference just applies in case of key clashes.

PiperOrigin-RevId: 266753249
This commit is contained in:
tonihei 2019-09-02 11:46:14 +01:00 committed by Toni
parent d9042a2985
commit aff9e731b2

View File

@ -52,6 +52,10 @@ import java.util.zip.GZIPInputStream;
* HTTP to HTTPS or vice versa). Cross-protocol redirects can be enabled by using the {@link
* #DefaultHttpDataSource(String, Predicate, int, int, boolean, RequestProperties)} constructor and
* passing {@code true} as the second last argument.
*
* <p>Note: HTTP request headers will be set using all parameters passed via (in order of decreasing
* priority) the {@code dataSpec}, {@link #setRequestProperty} and the default parameters used to
* construct the instance.
*/
public class DefaultHttpDataSource extends BaseDataSource implements HttpDataSource {
@ -265,10 +269,6 @@ public class DefaultHttpDataSource extends BaseDataSource implements HttpDataSou
/**
* Opens the source to read the specified data.
*
* <p>Note: HTTP request headers will be set using parameters passed via (in order of decreasing
* priority) the {@code dataSpec}, {@link #setRequestProperty} and the default parameters used to
* construct the instance.
*/
@Override
public long open(DataSpec dataSpec) throws HttpDataSourceException {