Package jcifs.http
Class NtlmHttpURLConnection
- java.lang.Object
-
- java.net.URLConnection
-
- java.net.HttpURLConnection
-
- jcifs.http.NtlmHttpURLConnection
-
@Deprecated public class NtlmHttpURLConnection extends HttpURLConnection
Deprecated.This is broken by design, even a possible vulnerability. Deprecation is conditional on whether future JDK versions will allow to do this safely.Wraps anHttpURLConnection
to provide NTLM authentication services. Please read Using jCIFS NTLM Authentication for HTTP Connections. Warning: Do not use this if there is a chance that you might have multiple connections (even plain HttpURLConnections, for the complete JRE) to the same host with different or mixed anonymous/authenticated credentials. Authenticated connections can/will be reused.
-
-
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, CIFSContext tc)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addRequestProperty(String key, String value)
Deprecated.void
connect()
Deprecated.void
disconnect()
Deprecated.boolean
getAllowUserInteraction()
Deprecated.int
getConnectTimeout()
Deprecated.Object
getContent()
Deprecated.Object
getContent(Class[] classes)
Deprecated.String
getContentEncoding()
Deprecated.int
getContentLength()
Deprecated.String
getContentType()
Deprecated.long
getDate()
Deprecated.boolean
getDefaultUseCaches()
Deprecated.boolean
getDoInput()
Deprecated.boolean
getDoOutput()
Deprecated.InputStream
getErrorStream()
Deprecated.long
getExpiration()
Deprecated.String
getHeaderField(int index)
Deprecated.String
getHeaderField(String header)
Deprecated.long
getHeaderFieldDate(String header, long def)
Deprecated.int
getHeaderFieldInt(String header, int def)
Deprecated.String
getHeaderFieldKey(int index)
Deprecated.Map<String,List<String>>
getHeaderFields()
Deprecated.long
getIfModifiedSince()
Deprecated.InputStream
getInputStream()
Deprecated.boolean
getInstanceFollowRedirects()
Deprecated.long
getLastModified()
Deprecated.OutputStream
getOutputStream()
Deprecated.Permission
getPermission()
Deprecated.int
getReadTimeout()
Deprecated.String
getRequestMethod()
Deprecated.Map<String,List<String>>
getRequestProperties()
Deprecated.String
getRequestProperty(String key)
Deprecated.int
getResponseCode()
Deprecated.String
getResponseMessage()
Deprecated.URL
getURL()
Deprecated.boolean
getUseCaches()
Deprecated.void
setAllowUserInteraction(boolean allowUserInteraction)
Deprecated.void
setConnectTimeout(int timeout)
Deprecated.void
setDefaultUseCaches(boolean defaultUseCaches)
Deprecated.void
setDoInput(boolean doInput)
Deprecated.void
setDoOutput(boolean doOutput)
Deprecated.void
setIfModifiedSince(long ifModifiedSince)
Deprecated.void
setInstanceFollowRedirects(boolean instanceFollowRedirects)
Deprecated.void
setReadTimeout(int timeout)
Deprecated.void
setRequestMethod(String requestMethod)
Deprecated.void
setRequestProperty(String key, String value)
Deprecated.void
setUseCaches(boolean useCaches)
Deprecated.String
toString()
Deprecated.boolean
usingProxy()
Deprecated.-
Methods inherited from class java.net.HttpURLConnection
getFollowRedirects, setAuthenticator, setChunkedStreamingMode, setFixedLengthStreamingMode, setFixedLengthStreamingMode, setFollowRedirects
-
Methods inherited from class java.net.URLConnection
getContentLengthLong, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getFileNameMap, getHeaderFieldLong, guessContentTypeFromName, guessContentTypeFromStream, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setFileNameMap
-
-
-
-
Constructor Detail
-
NtlmHttpURLConnection
public NtlmHttpURLConnection(HttpURLConnection connection, CIFSContext tc)
Deprecated.- Parameters:
connection
- connection to wraptc
- context to use
-
-
Method Detail
-
connect
public void connect() throws IOException
Deprecated.- Specified by:
connect
in classURLConnection
- Throws:
IOException
-
getURL
public URL getURL()
Deprecated.- Overrides:
getURL
in classURLConnection
-
getContentLength
public int getContentLength()
Deprecated.- Overrides:
getContentLength
in classURLConnection
-
getContentType
public String getContentType()
Deprecated.- Overrides:
getContentType
in classURLConnection
-
getContentEncoding
public String getContentEncoding()
Deprecated.- Overrides:
getContentEncoding
in classURLConnection
-
getExpiration
public long getExpiration()
Deprecated.- Overrides:
getExpiration
in classURLConnection
-
getDate
public long getDate()
Deprecated.- Overrides:
getDate
in classURLConnection
-
getLastModified
public long getLastModified()
Deprecated.- Overrides:
getLastModified
in classURLConnection
-
getHeaderField
public String getHeaderField(String header)
Deprecated.- Overrides:
getHeaderField
in classURLConnection
-
getHeaderFields
public Map<String,List<String>> getHeaderFields()
Deprecated.- Overrides:
getHeaderFields
in classURLConnection
-
getHeaderFieldInt
public int getHeaderFieldInt(String header, int def)
Deprecated.- Overrides:
getHeaderFieldInt
in classURLConnection
-
getHeaderFieldDate
public long getHeaderFieldDate(String header, long def)
Deprecated.- Overrides:
getHeaderFieldDate
in classHttpURLConnection
-
getHeaderFieldKey
public String getHeaderFieldKey(int index)
Deprecated.- Overrides:
getHeaderFieldKey
in classHttpURLConnection
-
getHeaderField
public String getHeaderField(int index)
Deprecated.- Overrides:
getHeaderField
in classHttpURLConnection
-
getContent
public Object getContent() throws IOException
Deprecated.- Overrides:
getContent
in classURLConnection
- Throws:
IOException
-
getContent
public Object getContent(Class[] classes) throws IOException
Deprecated.- Overrides:
getContent
in classURLConnection
- Throws:
IOException
-
getPermission
public Permission getPermission() throws IOException
Deprecated.- Overrides:
getPermission
in classHttpURLConnection
- Throws:
IOException
-
getInputStream
public InputStream getInputStream() throws IOException
Deprecated.- Overrides:
getInputStream
in classURLConnection
- Throws:
IOException
-
getOutputStream
public OutputStream getOutputStream() throws IOException
Deprecated.- Overrides:
getOutputStream
in classURLConnection
- Throws:
IOException
-
toString
public String toString()
Deprecated.- Overrides:
toString
in classURLConnection
-
setDoInput
public void setDoInput(boolean doInput)
Deprecated.- Overrides:
setDoInput
in classURLConnection
-
getDoInput
public boolean getDoInput()
Deprecated.- Overrides:
getDoInput
in classURLConnection
-
setDoOutput
public void setDoOutput(boolean doOutput)
Deprecated.- Overrides:
setDoOutput
in classURLConnection
-
getDoOutput
public boolean getDoOutput()
Deprecated.- Overrides:
getDoOutput
in classURLConnection
-
setAllowUserInteraction
public void setAllowUserInteraction(boolean allowUserInteraction)
Deprecated.- Overrides:
setAllowUserInteraction
in classURLConnection
-
getAllowUserInteraction
public boolean getAllowUserInteraction()
Deprecated.- Overrides:
getAllowUserInteraction
in classURLConnection
-
setUseCaches
public void setUseCaches(boolean useCaches)
Deprecated.- Overrides:
setUseCaches
in classURLConnection
-
getUseCaches
public boolean getUseCaches()
Deprecated.- Overrides:
getUseCaches
in classURLConnection
-
setIfModifiedSince
public void setIfModifiedSince(long ifModifiedSince)
Deprecated.- Overrides:
setIfModifiedSince
in classURLConnection
-
getIfModifiedSince
public long getIfModifiedSince()
Deprecated.- Overrides:
getIfModifiedSince
in classURLConnection
-
getDefaultUseCaches
public boolean getDefaultUseCaches()
Deprecated.- Overrides:
getDefaultUseCaches
in classURLConnection
-
setDefaultUseCaches
public void setDefaultUseCaches(boolean defaultUseCaches)
Deprecated.- Overrides:
setDefaultUseCaches
in classURLConnection
-
getConnectTimeout
public int getConnectTimeout()
Deprecated.- Overrides:
getConnectTimeout
in classURLConnection
-
setConnectTimeout
public void setConnectTimeout(int timeout)
Deprecated.- Overrides:
setConnectTimeout
in classURLConnection
-
getReadTimeout
public int getReadTimeout()
Deprecated.- Overrides:
getReadTimeout
in classURLConnection
-
setReadTimeout
public void setReadTimeout(int timeout)
Deprecated.- Overrides:
setReadTimeout
in classURLConnection
-
setRequestProperty
public void setRequestProperty(String key, String value)
Deprecated.- Overrides:
setRequestProperty
in classURLConnection
-
addRequestProperty
public void addRequestProperty(String key, String value)
Deprecated.- Overrides:
addRequestProperty
in classURLConnection
-
getRequestProperty
public String getRequestProperty(String key)
Deprecated.- Overrides:
getRequestProperty
in classURLConnection
-
getRequestProperties
public Map<String,List<String>> getRequestProperties()
Deprecated.- Overrides:
getRequestProperties
in classURLConnection
-
setInstanceFollowRedirects
public void setInstanceFollowRedirects(boolean instanceFollowRedirects)
Deprecated.- Overrides:
setInstanceFollowRedirects
in classHttpURLConnection
-
getInstanceFollowRedirects
public boolean getInstanceFollowRedirects()
Deprecated.- Overrides:
getInstanceFollowRedirects
in classHttpURLConnection
-
setRequestMethod
public void setRequestMethod(String requestMethod) throws ProtocolException
Deprecated.- Overrides:
setRequestMethod
in classHttpURLConnection
- Throws:
ProtocolException
-
getRequestMethod
public String getRequestMethod()
Deprecated.- Overrides:
getRequestMethod
in classHttpURLConnection
-
getResponseCode
public int getResponseCode() throws IOException
Deprecated.- Overrides:
getResponseCode
in classHttpURLConnection
- Throws:
IOException
-
getResponseMessage
public String getResponseMessage() throws IOException
Deprecated.- Overrides:
getResponseMessage
in classHttpURLConnection
- Throws:
IOException
-
disconnect
public void disconnect()
Deprecated.- Specified by:
disconnect
in classHttpURLConnection
-
usingProxy
public boolean usingProxy()
Deprecated.- Specified by:
usingProxy
in classHttpURLConnection
-
getErrorStream
public InputStream getErrorStream()
Deprecated.- Overrides:
getErrorStream
in classHttpURLConnection
-
-