|
|||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
java.lang.Objectim.yixin.sdk.http.multipart.Part
im.yixin.sdk.http.multipart.PartBase
im.yixin.sdk.http.multipart.FilePart
public class FilePart
This class implements a part of a Multipart post object that consists of a file.
字段摘要 | |
---|---|
static java.lang.String |
DEFAULT_CHARSET
Default charset of file attachments. |
static java.lang.String |
DEFAULT_CONTENT_TYPE
Default content encoding of file attachments. |
static java.lang.String |
DEFAULT_TRANSFER_ENCODING
Default transfer encoding of file attachments. |
protected static java.lang.String |
FILE_NAME
Attachment's file name |
从类 im.yixin.sdk.http.multipart.Part 继承的字段 |
---|
BOUNDARY, BOUNDARY_BYTES, CHARSET, CHARSET_BYTES, CONTENT_DISPOSITION, CONTENT_DISPOSITION_BYTES, CONTENT_TRANSFER_ENCODING, CONTENT_TRANSFER_ENCODING_BYTES, CONTENT_TYPE, CONTENT_TYPE_BYTES, CRLF, CRLF_BYTES, EXTRA, EXTRA_BYTES, QUOTE, QUOTE_BYTES |
构造方法摘要 | |
---|---|
FilePart(java.lang.String name,
PartSource partSource)
FilePart Constructor. |
|
FilePart(java.lang.String name,
PartSource partSource,
java.lang.String contentType,
java.lang.String charset)
FilePart Constructor. |
|
FilePart(java.lang.String name,
java.lang.String ofile,
java.io.File file,
java.lang.String contentType,
java.lang.String charset)
FilePart Constructor. |
方法摘要 | |
---|---|
protected PartSource |
getSource()
Returns the source of the file part. |
protected long |
lengthOfData()
Return the length of the data. |
protected void |
sendData(java.io.OutputStream out)
Write the data in "source" to the specified stream. |
protected void |
sendDispositionHeader(java.io.OutputStream out)
Write the disposition header to the output stream |
从类 im.yixin.sdk.http.multipart.PartBase 继承的方法 |
---|
getCharSet, getContentType, getName, getTransferEncoding, setCharSet, setContentType, setName, setTransferEncoding |
从类 im.yixin.sdk.http.multipart.Part 继承的方法 |
---|
getBoundary, getLengthOfParts, getLengthOfParts, getPartBoundary, isRepeatable, length, send, sendContentTypeHeader, sendEnd, sendEndOfHeader, sendParts, sendParts, sendStart, sendTransferEncodingHeader, toString |
从类 java.lang.Object 继承的方法 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
字段详细信息 |
---|
public static final java.lang.String DEFAULT_CONTENT_TYPE
public static final java.lang.String DEFAULT_CHARSET
public static final java.lang.String DEFAULT_TRANSFER_ENCODING
protected static final java.lang.String FILE_NAME
构造方法详细信息 |
---|
public FilePart(java.lang.String name, PartSource partSource, java.lang.String contentType, java.lang.String charset)
name
- the name for this partpartSource
- the source for this partcontentType
- the content type for this part, if null
the
default
is usedcharset
- the charset encoding for this part, if null
the
default
is usedpublic FilePart(java.lang.String name, PartSource partSource)
name
- the name for this partpartSource
- the source for this partpublic FilePart(java.lang.String name, java.lang.String ofile, java.io.File file, java.lang.String contentType, java.lang.String charset) throws java.io.FileNotFoundException
name
- the name of the file partfile
- the file to postcontentType
- the content type for this part, if null
the
default
is usedcharset
- the charset encoding for this part, if null
the
default
is used
java.io.FileNotFoundException
- if the file is not a normal file or if it is not
readable.方法详细信息 |
---|
protected void sendDispositionHeader(java.io.OutputStream out) throws java.io.IOException
Part
中的 sendDispositionHeader
out
- The output stream
java.io.IOException
- If an IO problem occursPart.sendDispositionHeader(OutputStream)
protected void sendData(java.io.OutputStream out) throws java.io.IOException
Part
中的 sendData
out
- The output stream.
java.io.IOException
- if an IO problem occurs.Part.sendData(OutputStream)
protected PartSource getSource()
protected long lengthOfData()
Part
中的 lengthOfData
Part.lengthOfData()
|
|||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |