|
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.agp.multipart2.MultipartProvider
public class MultipartProvider
Provides content for a multi-part HTTP request (outbound).
Constructor Summary | |
---|---|
MultipartProvider()
Default constructor. |
Method Summary | |
---|---|
void |
add(MPart part)
Adds a part. |
void |
add(String name,
byte[] data,
String filename,
String contentType,
String charset)
Adds a part. |
void |
add(String name,
File file,
String filename,
String contentType,
String charset,
boolean deleteAfterUpload)
Adds a part. |
void |
add(String name,
String data)
Adds a part. |
void |
add(String name,
String data,
String contentType)
Adds a part. |
protected byte[] |
getAsciiBytes(String value)
Gets the US-ASCII bytes for a value |
String |
getBoundary()
Gets the boundary string. |
long |
getContentLength()
Gets the request body content length. |
String |
getContentType()
Gets the content type. |
List<MPart> |
getParts()
Gets the parts. |
boolean |
isRepeatable()
True if all the parts can be written to the output stream more than once. |
void |
setBoundary(String boundary)
Sets the boundary string. |
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 MultipartProvider()
Method Detail |
---|
public String getBoundary()
public void setBoundary(String boundary)
boundary
- the boundarypublic String getContentType()
getContentType
in class ContentProvider
public List<MPart> getParts()
public void add(MPart part)
part
- the partpublic void add(String name, String data) throws IOException
name
- the part namedata
- the data value
IOException
- if an exception occurspublic void add(String name, String data, String contentType) throws IOException
name
- the namedata
- the datacontentType
- the content type
IOException
- if an exception occurspublic void add(String name, byte[] data, String filename, String contentType, String charset) throws IOException
name
- the namedata
- the datafilename
- the file namecontentType
- the content typecharset
- the character set
IOException
- if an exception occurspublic void add(String name, File file, String filename, String contentType, String charset, boolean deleteAfterUpload) throws IOException
name
- the namefile
- the filefilename
- the file namecontentType
- the content typecharset
- the character setdeleteAfterUpload
- if true then delete the file after uploading
IOException
- if an exception occursprotected byte[] getAsciiBytes(String value) throws UnsupportedEncodingException
value
- the value
UnsupportedEncodingException
- if the encoding is unsupportedpublic long getContentLength()
getContentLength
in class ContentProvider
public boolean isRepeatable()
isRepeatable
in class ContentProvider
public void writeRequest(HttpClientRequest request, OutputStream destination) throws IOException
writeRequest
in class ContentProvider
request
- the HTTP request that is executingdestination
- the output stream to which data will be written
IOException
- if an exception occurs
|
Esri Geoportal Server 1.2.9
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |