Package jcifs.smb1.http
Class NtlmHttpURLConnection
- java.lang.Object
-
- java.net.URLConnection
-
- java.net.HttpURLConnection
-
- jcifs.smb1.http.NtlmHttpURLConnection
-
public class NtlmHttpURLConnection extends HttpURLConnection
Wraps anHttpURLConnectionto provide NTLM authentication services. Please read Using jCIFS NTLM Authentication for HTTP Connections.
-
-
Field Summary
-
Fields inherited from class java.net.HttpURLConnection
chunkLength, fixedContentLength, fixedContentLengthLong, 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, instanceFollowRedirects, method, responseCode, responseMessage
-
Fields inherited from class java.net.URLConnection
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches
-
-
Constructor Summary
Constructors Constructor Description NtlmHttpURLConnection(HttpURLConnection connection)
-
Method Summary
-
Methods inherited from class java.net.HttpURLConnection
getFollowRedirects, setAuthenticator, setChunkedStreamingMode, setFixedLengthStreamingMode, setFixedLengthStreamingMode, setFollowRedirects
-
Methods inherited from class java.net.URLConnection
getConnectTimeout, getContentLengthLong, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getFileNameMap, getHeaderFieldLong, getReadTimeout, guessContentTypeFromName, guessContentTypeFromStream, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setFileNameMap, setReadTimeout
-
-
-
-
Constructor Detail
-
NtlmHttpURLConnection
public NtlmHttpURLConnection(HttpURLConnection connection)
-
-
Method Detail
-
connect
public void connect() throws IOException- Specified by:
connectin classURLConnection- Throws:
IOException
-
getURL
public URL getURL()
- Overrides:
getURLin classURLConnection
-
getContentLength
public int getContentLength()
- Overrides:
getContentLengthin classURLConnection
-
getContentType
public String getContentType()
- Overrides:
getContentTypein classURLConnection
-
getContentEncoding
public String getContentEncoding()
- Overrides:
getContentEncodingin classURLConnection
-
getExpiration
public long getExpiration()
- Overrides:
getExpirationin classURLConnection
-
getDate
public long getDate()
- Overrides:
getDatein classURLConnection
-
getLastModified
public long getLastModified()
- Overrides:
getLastModifiedin classURLConnection
-
getHeaderField
public String getHeaderField(String header)
- Overrides:
getHeaderFieldin classURLConnection
-
getHeaderFields
public Map getHeaderFields()
- Overrides:
getHeaderFieldsin classURLConnection
-
getHeaderFieldInt
public int getHeaderFieldInt(String header, int def)
- Overrides:
getHeaderFieldIntin classURLConnection
-
getHeaderFieldDate
public long getHeaderFieldDate(String header, long def)
- Overrides:
getHeaderFieldDatein classHttpURLConnection
-
getHeaderFieldKey
public String getHeaderFieldKey(int index)
- Overrides:
getHeaderFieldKeyin classHttpURLConnection
-
getHeaderField
public String getHeaderField(int index)
- Overrides:
getHeaderFieldin classHttpURLConnection
-
getContent
public Object getContent() throws IOException
- Overrides:
getContentin classURLConnection- Throws:
IOException
-
getContent
public Object getContent(Class[] classes) throws IOException
- Overrides:
getContentin classURLConnection- Throws:
IOException
-
getPermission
public Permission getPermission() throws IOException
- Overrides:
getPermissionin classHttpURLConnection- Throws:
IOException
-
getInputStream
public InputStream getInputStream() throws IOException
- Overrides:
getInputStreamin classURLConnection- Throws:
IOException
-
getOutputStream
public OutputStream getOutputStream() throws IOException
- Overrides:
getOutputStreamin classURLConnection- Throws:
IOException
-
toString
public String toString()
- Overrides:
toStringin classURLConnection
-
setDoInput
public void setDoInput(boolean doInput)
- Overrides:
setDoInputin classURLConnection
-
getDoInput
public boolean getDoInput()
- Overrides:
getDoInputin classURLConnection
-
setDoOutput
public void setDoOutput(boolean doOutput)
- Overrides:
setDoOutputin classURLConnection
-
getDoOutput
public boolean getDoOutput()
- Overrides:
getDoOutputin classURLConnection
-
setAllowUserInteraction
public void setAllowUserInteraction(boolean allowUserInteraction)
- Overrides:
setAllowUserInteractionin classURLConnection
-
getAllowUserInteraction
public boolean getAllowUserInteraction()
- Overrides:
getAllowUserInteractionin classURLConnection
-
setUseCaches
public void setUseCaches(boolean useCaches)
- Overrides:
setUseCachesin classURLConnection
-
getUseCaches
public boolean getUseCaches()
- Overrides:
getUseCachesin classURLConnection
-
setIfModifiedSince
public void setIfModifiedSince(long ifModifiedSince)
- Overrides:
setIfModifiedSincein classURLConnection
-
getIfModifiedSince
public long getIfModifiedSince()
- Overrides:
getIfModifiedSincein classURLConnection
-
getDefaultUseCaches
public boolean getDefaultUseCaches()
- Overrides:
getDefaultUseCachesin classURLConnection
-
setDefaultUseCaches
public void setDefaultUseCaches(boolean defaultUseCaches)
- Overrides:
setDefaultUseCachesin classURLConnection
-
setRequestProperty
public void setRequestProperty(String key, String value)
- Overrides:
setRequestPropertyin classURLConnection
-
addRequestProperty
public void addRequestProperty(String key, String value)
- Overrides:
addRequestPropertyin classURLConnection
-
getRequestProperty
public String getRequestProperty(String key)
- Overrides:
getRequestPropertyin classURLConnection
-
getRequestProperties
public Map getRequestProperties()
- Overrides:
getRequestPropertiesin classURLConnection
-
setInstanceFollowRedirects
public void setInstanceFollowRedirects(boolean instanceFollowRedirects)
- Overrides:
setInstanceFollowRedirectsin classHttpURLConnection
-
getInstanceFollowRedirects
public boolean getInstanceFollowRedirects()
- Overrides:
getInstanceFollowRedirectsin classHttpURLConnection
-
setRequestMethod
public void setRequestMethod(String requestMethod) throws ProtocolException
- Overrides:
setRequestMethodin classHttpURLConnection- Throws:
ProtocolException
-
getRequestMethod
public String getRequestMethod()
- Overrides:
getRequestMethodin classHttpURLConnection
-
getResponseCode
public int getResponseCode() throws IOException- Overrides:
getResponseCodein classHttpURLConnection- Throws:
IOException
-
getResponseMessage
public String getResponseMessage() throws IOException
- Overrides:
getResponseMessagein classHttpURLConnection- Throws:
IOException
-
disconnect
public void disconnect()
- Specified by:
disconnectin classHttpURLConnection
-
usingProxy
public boolean usingProxy()
- Specified by:
usingProxyin classHttpURLConnection
-
getErrorStream
public InputStream getErrorStream()
- Overrides:
getErrorStreamin classHttpURLConnection
-
-