public class UploadedFile extends Object
Files are uploaded via the REST API by POSTing multipart/form-data
to a resource method
which consumes multipart/form-data
and has UploadedFile as its entity parameter.
Constructor and Description |
---|
UploadedFile(String name,
long size,
InputStream in,
DiskQuotaCheck diskQuotaCheck) |
Modifier and Type | Method and Description |
---|---|
InputStream |
getInputStream()
Returns an InputStream that can be used to retrieve the contents of the uploaded file.
|
String |
getName()
Returns the original filename in the client's filesystem, as provided by the browser (or other client software).
|
String |
getString()
Returns the contents of the uploaded file as a String, using the default character encoding.
|
String |
getString(String encoding)
Returns the contents of the uploaded file as a String, using the given encoding.
|
String |
toString() |
public UploadedFile(String name, long size, InputStream in, DiskQuotaCheck diskQuotaCheck)
public String getName()
public String getString()
public String getString(String encoding)
public InputStream getInputStream()
Copyright © 2023. All Rights Reserved.