10000 fix: Update JavaDocto be more descriptive (#21447) · vaadin/flow@86a6626 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit 86a6626

Browse files
authored
fix: Update JavaDocto be more descriptive (#21447)
Update overload JavaDoc to have description of difference in the first sentence.
1 parent 9a6a820 commit 86a6626

File tree

2 files changed

+22
-13
lines changed

2 files changed

+22
-13
lines changed

flow-server/src/main/java/com/vaadin/flow/server/streams/DownloadHandler.java

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ static FileDownloadHandler forFile(File file) {
6868
}
6969

7070
/**
71-
* Get a download handler for serving given {@link File}.
71+
* Get a download handler for serving given {@link File} with the given
72+
* download name.
7273
*
7374
* @param file
7475
* file to server for download
@@ -118,7 +119,8 @@ static ClassDownloadHandler forClassResource(Class<?> clazz,
118119
}
119120

120121
/**
121-
* Generate a download handler for class resource.
122+
* Generate a download handler for class resource with the given download
123+
* name.
122124
* <p>
123125
* For instance for the file {@code resources/com/example/ui/MyData.json}
124126
* and class {@code com.example.ui.MyData} the definition would be
@@ -179,7 +181,8 @@ static ServletResourceDownloadHandler forServletResource(String path) {
179181
}
180182

181183
/**
182-
* Generate a download handler for a servlet resource.
184+
* Generate a download handler for a servlet resource with the given
185+
* download name.
183186
* <p>
184187
* For instance for the file {@code webapp/WEB-INF/servlet.json} the path
185188
* would be {@code /WEB-INF/servlet.json}
@@ -199,7 +202,8 @@ static ServletResourceDownloadHandler forServletResource(String path,
199202
}
200203

201204
/**
202-
* Generate a download handler for a servlet resource.
205+
* Generate a download handler for a servlet resource with the given
206+
* download name and progress listener.
203207
* <p>
204208
* For instance for the file {@code webapp/WEB-INF/servlet.json} the path
205209
* would be {@code /WEB-INF/servlet.json}
@@ -236,7 +240,8 @@ static InputStreamDownloadHandler fromInputStream(
236240
}
237241

238242
/**
239-
* Generate a function for downloading from a generated inputStream.
243+
* Generate a function for downloading from a generated inputStream with the
244+
* given download name.
240245
*
241246
* @param handler
242247
* handler function that will be called on download
@@ -251,7 +256,8 @@ static InputStreamDownloadHandler fromInputStream(
251256
}
252257

253258
/**
254-
* Generate a function for downloading from a generated inputStream.
259+
* Generate a function for downloading from a generated inputStream with the
260+
* given download name and progress listener.
255261
*
256262
* @param handler
257263
* handler function that will be called on download

flow-server/src/main/java/com/vaadin/flow/server/streams/UploadHandler.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ default long getFileCountMax() {
232232
}
233233

234234
/**
235-
* Generate a upload handler for storing upload stream into a file.
235+
* Generate an upload handler for storing upload stream into a file.
236236
*
237237
* @param successHandler
238238
* consumer to be called when upload successfully completes
@@ -247,7 +247,8 @@ static FileUploadHandler toFile(
247247
}
248248

249249
/**
250-
* Generate a upload handler for storing upload stream into a file.
250+
* Generate an upload handler for storing upload stream into a file with
251+
* progress handling.
251252
*
252253
* @param successHandler
253254
* consumer to be called when upload successfully completes
@@ -267,7 +268,8 @@ static FileUploadHandler toFile(
267268
}
268269

269270
/**
270-
* Generate upload handler for storing upload stream into a temporary file.
271+
* Generate an upload handler for storing upload stream into a temporary
272+
* file.
271273
*
272274
* @param successHandler
273275
* consumer to be called when upload successfully completes
@@ -279,7 +281,8 @@ static TemporaryFileUploadHandler toTempFile(
279281
}
280282

281283
/**
282-
* Generate upload handler for storing upload stream into a temporary file.
284+
* Generate an upload handler for storing upload stream into a temporary
285+
* file with progress handling.
283286
*
284287
* @param successHandler
285288
* consumer to be called when upload successfully completes
@@ -302,7 +305,7 @@ static TemporaryFileUploadHandler toTempFile(
302305
*
303306
* @param successHandler
304307
* consumer to be called when upload successfully completes
305-
* @return in-memory upoload handler
308+
* @return in-memory upload handler
306309
*/
307310
static InMemoryUploadHandler inMemory(
308311
SerializableBiConsumer<UploadMetadata, byte[]> successHandler) {
@@ -311,13 +314,13 @@ static InMemoryUploadHandler inMemory(
311314

312315
/**
313316
* Generate upload handler for storing download into in-memory
314-
* {@code byte[]}.
317+
* {@code byte[]} with progress handling.
315318
*
316319
* @param successHandler
317320
* consumer to be called when upload successfully completes
318321
* @param listener
319322
* listener for transfer progress events
320-
* @return in-memory upoload handler with progress listener
323+
* @return in-memory upload handler with progress listener
321324
*/
322325
static InMemoryUploadHandler inMemory(
323326
SerializableBiConsumer<UploadMetadata, byte[]> successHandler,

0 commit comments

Comments
 (0)
0