public final class FilePart
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
com.android.volley.toolbox.multipart.BasePart.IHeadersProvider |
| Modifier and Type | Field and Description |
|---|---|
protected com.android.volley.toolbox.multipart.BasePart.IHeadersProvider |
headersProvider |
| Constructor and Description |
|---|
FilePart(java.lang.String name,
java.io.File file,
java.lang.String filename,
java.lang.String contentType) |
| Modifier and Type | Method and Description |
|---|---|
long |
getContentLength(com.android.volley.toolbox.multipart.Boundary boundary) |
protected byte[] |
getHeader(com.android.volley.toolbox.multipart.Boundary boundary) |
void |
writeTo(java.io.OutputStream out,
com.android.volley.toolbox.multipart.Boundary boundary) |
protected com.android.volley.toolbox.multipart.BasePart.IHeadersProvider headersProvider
public FilePart(java.lang.String name,
java.io.File file,
java.lang.String filename,
java.lang.String contentType)
name - String - name of parameter (may not be null).file - File (may not be null).filename - String. If null is passed,
then file.getName() is used.contentType - String. If null is passed,
then default "application/octet-stream" is used.java.lang.IllegalArgumentException - if either file
or name is null.public long getContentLength(com.android.volley.toolbox.multipart.Boundary boundary)
public void writeTo(java.io.OutputStream out,
com.android.volley.toolbox.multipart.Boundary boundary)
throws java.io.IOException
java.io.IOExceptionprotected byte[] getHeader(com.android.volley.toolbox.multipart.Boundary boundary)