public class MultipartResource extends Object
| Modifier and Type | Field and Description |
|---|---|
private String |
fileName |
private okhttp3.MediaType |
mediaType |
private static Pattern |
pattern |
private byte[] |
source |
| Constructor and Description |
|---|
MultipartResource(okhttp3.MediaType mediaType,
String fileName,
byte[] source)
Instantiates a new Multipart resource.
|
MultipartResource(okhttp3.MediaType mediaType,
String fileName,
InputStream inputStream)
Instantiates a new Multipart resource.
|
MultipartResource(String fileName,
byte[] source)
Instantiates a new Multipart resource.
|
MultipartResource(String fileName,
InputStream inputStream)
Instantiates a new Multipart resource.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getFileName()
Gets file name.
|
okhttp3.MediaType |
getMediaType()
Gets media type.
|
byte[] |
getSource()
Get source byte [ ].
|
private static final Pattern pattern
private final okhttp3.MediaType mediaType
private final String fileName
private final byte[] source
public MultipartResource(String fileName, InputStream inputStream) throws IOException
fileName - the file nameinputStream - the input streamIOException - the io exceptionpublic MultipartResource(okhttp3.MediaType mediaType,
String fileName,
InputStream inputStream)
throws IOException
mediaType - the media typefileName - the file nameinputStream - the input streamIOException - the io exceptionpublic MultipartResource(String fileName, byte[] source)
fileName - the file namesource - the sourcepublic MultipartResource(okhttp3.MediaType mediaType,
String fileName,
byte[] source)
mediaType - the media typefileName - the fileNamesource - the sourcepublic okhttp3.MediaType getMediaType()
public String getFileName()
public byte[] getSource()
Copyright © 2024. All rights reserved.