|
Esri Geoportal Server 1.2.9
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.esri.gpt.framework.http.ContentBase
com.esri.gpt.framework.http.ContentProvider
com.esri.gpt.framework.http.multipart.MultiPartContentProvider
public class MultiPartContentProvider
Multi-part provider. Use any of 'add' method to add suitable content part.
Constructor Summary | |
---|---|
MultiPartContentProvider()
|
Method Summary | |
---|---|
void |
add(String name,
byte[] bytes,
String fileName,
String contentType,
String charset)
Adds bytes attribute. |
void |
add(String name,
File file,
String fileName,
String contentType,
String charset,
boolean deleteAfterUpload)
Adds file attribute. |
void |
add(String name,
String value)
Adds string attribute. |
long |
getContentLength()
Gets the content length (in bytes) to be provided in the HTTP request header. |
String |
getContentType()
Gets the content type to be provided in the HTTP request header. |
boolean |
isRepeatable()
Tests if the HTTP request content can be written to the output stream more than once. |
void |
writeParts(PartWriter partWriter)
Writes all parts. |
void |
writeRequest(HttpClientRequest request,
OutputStream destination)
Writes the content of the HTTP request body to an output stream. |
Methods inherited from class com.esri.gpt.framework.http.ContentProvider |
---|
asBytes, ensureContentTypeEncoding, prepareForWrite |
Methods inherited from class com.esri.gpt.framework.http.ContentBase |
---|
executeIO, executeIO, getInitialBufferlength, getLoggableContent, setInitialBufferLength |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MultiPartContentProvider()
Method Detail |
---|
public long getContentLength()
ContentProvider
getContentLength
in class ContentProvider
public String getContentType()
ContentProvider
getContentType
in class ContentProvider
public boolean isRepeatable()
ContentProvider
isRepeatable
in class ContentProvider
public void writeRequest(HttpClientRequest request, OutputStream destination) throws IOException
ContentProvider
writeRequest
in class ContentProvider
request
- the HTTP request that is executingdestination
- the output stream to which data will be written
IOException
- if an exception occurspublic void writeParts(PartWriter partWriter) throws IOException
partWriter
- part writer
IOException
- if writing part failspublic void add(String name, String value) throws IOException
name
- attribute namevalue
- attribute value
IOException
- if error setting attributepublic void add(String name, File file, String fileName, String contentType, String charset, boolean deleteAfterUpload) throws IOException
name
- attribute namefile
- filefileName
- disposition file namecontentType
- content typecharset
- character setdeleteAfterUpload
- true
to delete file after being uploaded
IOException
- if error setting attributepublic void add(String name, byte[] bytes, String fileName, String contentType, String charset) throws IOException
name
- namebytes
- bytesfileName
- disposition file namecontentType
- content typecharset
- character set
IOException
- if error setting attribute
|
Esri Geoportal Server 1.2.9
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |