Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(914)

Unified Diff: components/cronet/android/api/src/org/chromium/net/UploadDataProviders.java

Issue 1773123003: Fix javadoc warnings in cronet's UploadDataProviders.java (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cronet/android/api/src/org/chromium/net/UploadDataProviders.java
diff --git a/components/cronet/android/api/src/org/chromium/net/UploadDataProviders.java b/components/cronet/android/api/src/org/chromium/net/UploadDataProviders.java
index 317bc32a808f9271cfc01c71356645a89b494a93..2bc694b731ffb4027291fc9631c657fce96cf62d 100644
--- a/components/cronet/android/api/src/org/chromium/net/UploadDataProviders.java
+++ b/components/cronet/android/api/src/org/chromium/net/UploadDataProviders.java
@@ -20,6 +20,7 @@ public final class UploadDataProviders {
* Uploads an entire file.
*
* @param file The file to upload
+ * @return A new UploadDataProvider for the given file
*/
public static UploadDataProvider create(final File file) {
return new FileUploadProvider(new FileChannelProvider() {
@@ -35,6 +36,7 @@ public final class UploadDataProviders {
*
* @param fd The file descriptor to upload
* @throws IllegalArgumentException if {@code fd} is not a file.
+ * @return A new UploadDataProvider for the given file descriptor
*/
public static UploadDataProvider create(final ParcelFileDescriptor fd) {
return new FileUploadProvider(new FileChannelProvider() {
@@ -52,17 +54,29 @@ public final class UploadDataProviders {
/**
* Uploads a ByteBuffer, from the current {@code buffer.position()} to {@code buffer.limit()}
+ * @param buffer The data to upload
+ * @return A new UploadDataProvider for the given buffer
*/
public static UploadDataProvider create(ByteBuffer buffer) {
return new ByteBufferUploadProvider(buffer.slice());
}
- /** Uploads {@code length} bytes from {@code data}, starting from {@code offset} */
+ /**
+ * Uploads {@code length} bytes from {@code data}, starting from {@code offset}
+ * @param data Array containing data to upload
+ * @param offset Offset within data to start with
+ * @param length Number of bytes to upload
+ * @return A new UploadDataProvider for the given data
+ */
public static UploadDataProvider create(byte[] data, int offset, int length) {
return new ByteBufferUploadProvider(ByteBuffer.wrap(data, offset, length));
}
- /** Uploads the contents of {@code data} */
+ /**
+ * Uploads the contents of {@code data}
+ * @param data Array containing data to upload
+ * @return A new UploadDataProvider for the given data
+ */
public static UploadDataProvider create(byte[] data) {
return create(data, 0, data.length);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698