类 | |
| class | FilePart |
Public 成员函数 | |
| AbMultipartEntity (AbHttpResponseListener responseListener) | |
| void | addPart (String key, String value, String contentType) |
| void | addPart (String key, String value) |
| void | addPart (String key, File file) |
| void | addPart (String key, File file, String type) |
| void | addPart (String key, String streamName, InputStream inputStream, String type) throws IOException |
| long | getContentLength () |
| Header | getContentType () |
| boolean | isChunked () |
| boolean | isRepeatable () |
| boolean | isStreaming () |
| void | writeTo (final OutputStream outstream) throws IOException |
| Header | getContentEncoding () |
| void | consumeContent () throws IOException, UnsupportedOperationException |
| InputStream | getContent () throws IOException, UnsupportedOperationException |
Private 成员函数 | |
| byte[] | createContentType (String type) |
| byte[] | createContentDisposition (final String key) |
| byte[] | createContentDisposition (final String key, final String fileName) |
| void | updateProgress (int count) |
Private 属性 | |
| String | boundary |
| byte[] | boundaryLine |
| byte[] | boundaryEnd |
| List< FilePart > | fileParts = new ArrayList<FilePart>() |
| ByteArrayOutputStream | out = new ByteArrayOutputStream() |
| AbHttpResponseListener | responseListener |
| int | bytesWritten |
| int | totalSize |
静态 Private 属性 | |
| static final String | APPLICATION_OCTET_STREAM = "application/octet-stream" |
| static final byte[] | CR_LF = ("\r\n").getBytes() |
| static final byte[] | TRANSFER_ENCODING_BINARY |
| static final char[] | MULTIPART_CHARS = "-_1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".toCharArray() |
© 2012 amsoft.cn 名称:AbMultipartEntity.java 描述:用于文件上传
|
inline |
构造方法.
| responseListener | 监听器 |
|
inline |
Adds the part.
| key | the key |
| value | the value |
| contentType | the content type |
|
inline |
Adds the part.
| key | the key |
| value | the value |
|
inline |
Adds the part.
| key | the key |
| file | the file |
|
inline |
Adds the part.
| key | the key |
| file | the file |
| type | the type |
|
inline |
Adds the part.
| key | the key |
| streamName | the stream name |
| inputStream | the input stream |
| type | the type |
| IOException | Signals that an I/O exception has occurred. |
|
inline |
描述:TODO.
| IOException | Signals that an I/O exception has occurred. |
| UnsupportedOperationException | the unsupported operation exception |
|
inlineprivate |
Creates the content disposition.
| key | the key |
|
inlineprivate |
Creates the content disposition.
| key | the key |
| fileName | the file name |
|
inlineprivate |
Creates the content type.
| type | the type |
|
inline |
描述:获取内容流.
| IOException | Signals that an I/O exception has occurred. |
| UnsupportedOperationException | the unsupported operation exception |
|
inline |
描述:获取编码.
|
inline |
描述:获取长度.
|
inline |
描述:获取类型.
|
inline |
描述:输出的内容长度不能确定.
|
inline |
描述:是否使用了不可重复的请求实体.
|
inline |
描述:TODO.
|
inlineprivate |
Update progress.
| count | the count |
|
inline |
描述:写入.
| outstream | the outstream |
| IOException | Signals that an I/O exception has occurred. |
|
staticprivate |
流常量.
|
private |
二进制串.
|
private |
二进制的结束.
|
private |
二进制的换行.
|
private |
已经写的字节数.
|
staticprivate |
结束符.
|
staticprivate |
字符.
|
private |
输出流.
|
private |
响应监听器.
|
private |
总大小.
|
staticprivate |
编码转换二进制.
1.8.8