Commit 9e6f9ee9 by tonihei Committed by Oliver Woodman

Remove DataSpec self-links.

We usually avoid linking to the same page. Replacing all {@link DataSpec}
with just "data spec" accordingly.

PiperOrigin-RevId: 242689537
parent 9779b348
...@@ -119,14 +119,14 @@ public final class DataSpec { ...@@ -119,14 +119,14 @@ public final class DataSpec {
public final long length; public final long length;
/** /**
* A key that uniquely identifies the original stream. Used for cache indexing. May be null if the * A key that uniquely identifies the original stream. Used for cache indexing. May be null if the
* {@link DataSpec} is not intended to be used in conjunction with a cache. * data spec is not intended to be used in conjunction with a cache.
*/ */
public final @Nullable String key; public final @Nullable String key;
/** Request {@link Flags flags}. */ /** Request {@link Flags flags}. */
public final @Flags int flags; public final @Flags int flags;
/** /**
* Construct a {@link DataSpec} for the given uri and with {@link #key} set to null. * Construct a data spec for the given uri and with {@link #key} set to null.
* *
* @param uri {@link #uri}. * @param uri {@link #uri}.
*/ */
...@@ -135,7 +135,7 @@ public final class DataSpec { ...@@ -135,7 +135,7 @@ public final class DataSpec {
} }
/** /**
* Construct a {@link DataSpec} for the given uri and with {@link #key} set to null. * Construct a data spec for the given uri and with {@link #key} set to null.
* *
* @param uri {@link #uri}. * @param uri {@link #uri}.
* @param flags {@link #flags}. * @param flags {@link #flags}.
...@@ -145,7 +145,7 @@ public final class DataSpec { ...@@ -145,7 +145,7 @@ public final class DataSpec {
} }
/** /**
* Construct a {@link DataSpec} where {@link #position} equals {@link #absoluteStreamPosition}. * Construct a data spec where {@link #position} equals {@link #absoluteStreamPosition}.
* *
* @param uri {@link #uri}. * @param uri {@link #uri}.
* @param absoluteStreamPosition {@link #absoluteStreamPosition}, equal to {@link #position}. * @param absoluteStreamPosition {@link #absoluteStreamPosition}, equal to {@link #position}.
...@@ -157,7 +157,7 @@ public final class DataSpec { ...@@ -157,7 +157,7 @@ public final class DataSpec {
} }
/** /**
* Construct a {@link DataSpec} where {@link #position} equals {@link #absoluteStreamPosition}. * Construct a data spec where {@link #position} equals {@link #absoluteStreamPosition}.
* *
* @param uri {@link #uri}. * @param uri {@link #uri}.
* @param absoluteStreamPosition {@link #absoluteStreamPosition}, equal to {@link #position}. * @param absoluteStreamPosition {@link #absoluteStreamPosition}, equal to {@link #position}.
...@@ -171,8 +171,7 @@ public final class DataSpec { ...@@ -171,8 +171,7 @@ public final class DataSpec {
} }
/** /**
* Construct a {@link DataSpec} where {@link #position} may differ from * Construct a data spec where {@link #position} may differ from {@link #absoluteStreamPosition}.
* {@link #absoluteStreamPosition}.
* *
* @param uri {@link #uri}. * @param uri {@link #uri}.
* @param absoluteStreamPosition {@link #absoluteStreamPosition}. * @param absoluteStreamPosition {@link #absoluteStreamPosition}.
...@@ -192,7 +191,7 @@ public final class DataSpec { ...@@ -192,7 +191,7 @@ public final class DataSpec {
} }
/** /**
* Construct a {@link DataSpec} by inferring the {@link #httpMethod} based on the {@code postBody} * Construct a data spec by inferring the {@link #httpMethod} based on the {@code postBody}
* parameter. If postBody is non-null, then httpMethod is set to {@link #HTTP_METHOD_POST}. If * parameter. If postBody is non-null, then httpMethod is set to {@link #HTTP_METHOD_POST}. If
* postBody is null, then httpMethod is set to {@link #HTTP_METHOD_GET}. * postBody is null, then httpMethod is set to {@link #HTTP_METHOD_GET}.
* *
...@@ -225,8 +224,7 @@ public final class DataSpec { ...@@ -225,8 +224,7 @@ public final class DataSpec {
} }
/** /**
* Construct a {@link DataSpec} where {@link #position} may differ from {@link * Construct a data spec where {@link #position} may differ from {@link #absoluteStreamPosition}.
* #absoluteStreamPosition}.
* *
* @param uri {@link #uri}. * @param uri {@link #uri}.
* @param httpMethod {@link #httpMethod}. * @param httpMethod {@link #httpMethod}.
...@@ -317,22 +315,22 @@ public final class DataSpec { ...@@ -317,22 +315,22 @@ public final class DataSpec {
} }
/** /**
* Returns a {@link DataSpec} that represents a subrange of the data defined by this DataSpec. The * Returns a data spec that represents a subrange of the data defined by this DataSpec. The
* subrange includes data from the offset up to the end of this DataSpec. * subrange includes data from the offset up to the end of this DataSpec.
* *
* @param offset The offset of the subrange. * @param offset The offset of the subrange.
* @return A {@link DataSpec} that represents a subrange of the data defined by this DataSpec. * @return A data spec that represents a subrange of the data defined by this DataSpec.
*/ */
public DataSpec subrange(long offset) { public DataSpec subrange(long offset) {
return subrange(offset, length == C.LENGTH_UNSET ? C.LENGTH_UNSET : length - offset); return subrange(offset, length == C.LENGTH_UNSET ? C.LENGTH_UNSET : length - offset);
} }
/** /**
* Returns a {@link DataSpec} that represents a subrange of the data defined by this DataSpec. * Returns a data spec that represents a subrange of the data defined by this DataSpec.
* *
* @param offset The offset of the subrange. * @param offset The offset of the subrange.
* @param length The length of the subrange. * @param length The length of the subrange.
* @return A {@link DataSpec} that represents a subrange of the data defined by this DataSpec. * @return A data spec that represents a subrange of the data defined by this DataSpec.
*/ */
public DataSpec subrange(long offset, long length) { public DataSpec subrange(long offset, long length) {
if (offset == 0 && this.length == length) { if (offset == 0 && this.length == length) {
...@@ -351,10 +349,10 @@ public final class DataSpec { ...@@ -351,10 +349,10 @@ public final class DataSpec {
} }
/** /**
* Returns a copy of this {@link DataSpec} with the specified Uri. * Returns a copy of this data spec with the specified Uri.
* *
* @param uri The new source {@link Uri}. * @param uri The new source {@link Uri}.
* @return The copied {@link DataSpec} with the specified Uri. * @return The copied data spec with the specified Uri.
*/ */
public DataSpec withUri(Uri uri) { public DataSpec withUri(Uri uri) {
return new DataSpec( return new DataSpec(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment