|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.net.URLConnection | +--java.net.HttpURLConnection | +--org.apache.cactus.mock.MockHttpURLConnection
Mock implementation of HttpURLConnection
.
Fields inherited from class java.net.HttpURLConnection |
HTTP_ACCEPTED, HTTP_BAD_GATEWAY, HTTP_BAD_METHOD, HTTP_BAD_REQUEST, HTTP_CLIENT_TIMEOUT, HTTP_CONFLICT, HTTP_CREATED, HTTP_ENTITY_TOO_LARGE, HTTP_FORBIDDEN, HTTP_GATEWAY_TIMEOUT, HTTP_GONE, HTTP_INTERNAL_ERROR, HTTP_LENGTH_REQUIRED, HTTP_MOVED_PERM, HTTP_MOVED_TEMP, HTTP_MULT_CHOICE, HTTP_NO_CONTENT, HTTP_NOT_ACCEPTABLE, HTTP_NOT_AUTHORITATIVE, HTTP_NOT_FOUND, HTTP_NOT_IMPLEMENTED, HTTP_NOT_MODIFIED, HTTP_OK, HTTP_PARTIAL, HTTP_PAYMENT_REQUIRED, HTTP_PRECON_FAILED, HTTP_PROXY_AUTH, HTTP_REQ_TOO_LONG, HTTP_RESET, HTTP_SEE_OTHER, HTTP_SERVER_ERROR, HTTP_UNAUTHORIZED, HTTP_UNAVAILABLE, HTTP_UNSUPPORTED_TYPE, HTTP_USE_PROXY, HTTP_VERSION |
Constructor Summary | |
MockHttpURLConnection(java.net.URL theURL)
|
Method Summary | |
void |
addGetHeaderFieldValue(java.lang.String theValue)
Add a new header field value to the vector of values that will be returned by getHeaderField() . |
void |
addGetInputStream(java.io.InputStream theValue)
Add a new input stream to the vector of values that will be returned by getInputStream() . |
void |
connect()
|
void |
disconnect()
|
java.lang.String |
getHeaderField(int fieldNumber)
See java.net.URLConnection.getHeaderField . |
java.io.InputStream |
getInputStream()
See java.net.URLConnection.getInputStream . |
boolean |
usingProxy()
|
Methods inherited from class java.net.HttpURLConnection |
getErrorStream, getFollowRedirects, getHeaderFieldDate, getInstanceFollowRedirects, getPermission, getRequestMethod, getResponseCode, getResponseMessage, setFollowRedirects, setInstanceFollowRedirects, setRequestMethod |
Methods inherited from class java.net.URLConnection |
getAllowUserInteraction, getContent, getContent, getContentEncoding, getContentLength, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderFieldInt, getHeaderFieldKey, getIfModifiedSince, getLastModified, getOutputStream, getRequestProperty, getURL, getUseCaches, guessContentTypeFromStream, setAllowUserInteraction, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setRequestProperty, setUseCaches, toString |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public MockHttpURLConnection(java.net.URL theURL)
theURL
- the underlying URLMethod Detail |
public void addGetHeaderFieldValue(java.lang.String theValue)
getHeaderField()
.theValue
- the header file value to addpublic void addGetInputStream(java.io.InputStream theValue)
getInputStream()
.theValue
- the input stream to addpublic java.lang.String getHeaderField(int fieldNumber)
java.net.URLConnection.getHeaderField
.getHeaderField
in class java.net.URLConnection
public java.io.InputStream getInputStream()
java.net.URLConnection.getInputStream
.getInputStream
in class java.net.URLConnection
public boolean usingProxy()
usingProxy
in class java.net.HttpURLConnection
public void disconnect()
disconnect
in class java.net.HttpURLConnection
public void connect()
connect
in class java.net.URLConnection
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |