|
Esri Geoportal Server 1.0
|
||||||||
| 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
public abstract class ContentProvider
Provider for the content of an HTTP request body.
| Constructor Summary | |
|---|---|
ContentProvider()
Default constructor. |
|
| Method Summary | |
|---|---|
static byte[] |
asBytes(String content)
Converts a String to a UTF-8 encoded byte array. |
static String |
ensureContentTypeEncoding(String contentType,
String charset)
Ensures that an HTTP Contype-Type string contains a supplied encoding (i.e. |
abstract long |
getContentLength()
Gets the content length (in bytes) to be provided in the HTTP request header. |
abstract String |
getContentType()
Gets the content type to be provided in the HTTP request header. |
abstract boolean |
isRepeatable()
Tests if the HTTP request content can be written to the output stream more than once. |
void |
prepareForWrite(HttpClientRequest request)
Provides an opportunity to prepare content prior to writing the HTTP request body. |
abstract 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.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 ContentProvider()
| Method Detail |
|---|
public abstract long getContentLength()
public abstract String getContentType()
public abstract boolean isRepeatable()
public static byte[] asBytes(String content)
content - the String to convert
public static String ensureContentTypeEncoding(String contentType,
String charset)
contentType - the HTTP Contype-Type string to checkcharset - the charset to enforce
public void prepareForWrite(HttpClientRequest request)
throws IOException
request - the HTTP request that is executing
IOException - if an exception occurs
public abstract void writeRequest(HttpClientRequest request,
OutputStream destination)
throws IOException
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.0
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||