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 anHttpURLConnectionto 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 voidaddRequestProperty(String key, String value)Deprecated.voidconnect()Deprecated.voiddisconnect()Deprecated.booleangetAllowUserInteraction()Deprecated.intgetConnectTimeout()Deprecated.ObjectgetContent()Deprecated.ObjectgetContent(Class[] classes)Deprecated.StringgetContentEncoding()Deprecated.intgetContentLength()Deprecated.StringgetContentType()Deprecated.longgetDate()Deprecated.booleangetDefaultUseCaches()Deprecated.booleangetDoInput()Deprecated.booleangetDoOutput()Deprecated.InputStreamgetErrorStream()Deprecated.longgetExpiration()Deprecated.StringgetHeaderField(int index)Deprecated.StringgetHeaderField(String header)Deprecated.longgetHeaderFieldDate(String header, long def)Deprecated.intgetHeaderFieldInt(String header, int def)Deprecated.StringgetHeaderFieldKey(int index)Deprecated.Map<String,List<String>>getHeaderFields()Deprecated.longgetIfModifiedSince()Deprecated.InputStreamgetInputStream()Deprecated.booleangetInstanceFollowRedirects()Deprecated.longgetLastModified()Deprecated.OutputStreamgetOutputStream()Deprecated.PermissiongetPermission()Deprecated.intgetReadTimeout()Deprecated.StringgetRequestMethod()Deprecated.Map<String,List<String>>getRequestProperties()Deprecated.StringgetRequestProperty(String key)Deprecated.intgetResponseCode()Deprecated.StringgetResponseMessage()Deprecated.URLgetURL()Deprecated.booleangetUseCaches()Deprecated.voidsetAllowUserInteraction(boolean allowUserInteraction)Deprecated.voidsetConnectTimeout(int timeout)Deprecated.voidsetDefaultUseCaches(boolean defaultUseCaches)Deprecated.voidsetDoInput(boolean doInput)Deprecated.voidsetDoOutput(boolean doOutput)Deprecated.voidsetIfModifiedSince(long ifModifiedSince)Deprecated.voidsetInstanceFollowRedirects(boolean instanceFollowRedirects)Deprecated.voidsetReadTimeout(int timeout)Deprecated.voidsetRequestMethod(String requestMethod)Deprecated.voidsetRequestProperty(String key, String value)Deprecated.voidsetUseCaches(boolean useCaches)Deprecated.StringtoString()Deprecated.booleanusingProxy()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 IOExceptionDeprecated.- Specified by:
connectin classURLConnection- Throws:
IOException
-
getURL
public URL getURL()
Deprecated.- Overrides:
getURLin classURLConnection
-
getContentLength
public int getContentLength()
Deprecated.- Overrides:
getContentLengthin classURLConnection
-
getContentType
public String getContentType()
Deprecated.- Overrides:
getContentTypein classURLConnection
-
getContentEncoding
public String getContentEncoding()
Deprecated.- Overrides:
getContentEncodingin classURLConnection
-
getExpiration
public long getExpiration()
Deprecated.- Overrides:
getExpirationin classURLConnection
-
getDate
public long getDate()
Deprecated.- Overrides:
getDatein classURLConnection
-
getLastModified
public long getLastModified()
Deprecated.- Overrides:
getLastModifiedin classURLConnection
-
getHeaderField
public String getHeaderField(String header)
Deprecated.- Overrides:
getHeaderFieldin classURLConnection
-
getHeaderFields
public Map<String,List<String>> getHeaderFields()
Deprecated.- Overrides:
getHeaderFieldsin classURLConnection
-
getHeaderFieldInt
public int getHeaderFieldInt(String header, int def)
Deprecated.- Overrides:
getHeaderFieldIntin classURLConnection
-
getHeaderFieldDate
public long getHeaderFieldDate(String header, long def)
Deprecated.- Overrides:
getHeaderFieldDatein classHttpURLConnection
-
getHeaderFieldKey
public String getHeaderFieldKey(int index)
Deprecated.- Overrides:
getHeaderFieldKeyin classHttpURLConnection
-
getHeaderField
public String getHeaderField(int index)
Deprecated.- Overrides:
getHeaderFieldin classHttpURLConnection
-
getContent
public Object getContent() throws IOException
Deprecated.- Overrides:
getContentin classURLConnection- Throws:
IOException
-
getContent
public Object getContent(Class[] classes) throws IOException
Deprecated.- Overrides:
getContentin classURLConnection- Throws:
IOException
-
getPermission
public Permission getPermission() throws IOException
Deprecated.- Overrides:
getPermissionin classHttpURLConnection- Throws:
IOException
-
getInputStream
public InputStream getInputStream() throws IOException
Deprecated.- Overrides:
getInputStreamin classURLConnection- Throws:
IOException
-
getOutputStream
public OutputStream getOutputStream() throws IOException
Deprecated.- Overrides:
getOutputStreamin classURLConnection- Throws:
IOException
-
toString
public String toString()
Deprecated.- Overrides:
toStringin classURLConnection
-
setDoInput
public void setDoInput(boolean doInput)
Deprecated.- Overrides:
setDoInputin classURLConnection
-
getDoInput
public boolean getDoInput()
Deprecated.- Overrides:
getDoInputin classURLConnection
-
setDoOutput
public void setDoOutput(boolean doOutput)
Deprecated.- Overrides:
setDoOutputin classURLConnection
-
getDoOutput
public boolean getDoOutput()
Deprecated.- Overrides:
getDoOutputin classURLConnection
-
setAllowUserInteraction
public void setAllowUserInteraction(boolean allowUserInteraction)
Deprecated.- Overrides:
setAllowUserInteractionin classURLConnection
-
getAllowUserInteraction
public boolean getAllowUserInteraction()
Deprecated.- Overrides:
getAllowUserInteractionin classURLConnection
-
setUseCaches
public void setUseCaches(boolean useCaches)
Deprecated.- Overrides:
setUseCachesin classURLConnection
-
getUseCaches
public boolean getUseCaches()
Deprecated.- Overrides:
getUseCachesin classURLConnection
-
setIfModifiedSince
public void setIfModifiedSince(long ifModifiedSince)
Deprecated.- Overrides:
setIfModifiedSincein classURLConnection
-
getIfModifiedSince
public long getIfModifiedSince()
Deprecated.- Overrides:
getIfModifiedSincein classURLConnection
-
getDefaultUseCaches
public boolean getDefaultUseCaches()
Deprecated.- Overrides:
getDefaultUseCachesin classURLConnection
-
setDefaultUseCaches
public void setDefaultUseCaches(boolean defaultUseCaches)
Deprecated.- Overrides:
setDefaultUseCachesin classURLConnection
-
getConnectTimeout
public int getConnectTimeout()
Deprecated.- Overrides:
getConnectTimeoutin classURLConnection
-
setConnectTimeout
public void setConnectTimeout(int timeout)
Deprecated.- Overrides:
setConnectTimeoutin classURLConnection
-
getReadTimeout
public int getReadTimeout()
Deprecated.- Overrides:
getReadTimeoutin classURLConnection
-
setReadTimeout
public void setReadTimeout(int timeout)
Deprecated.- Overrides:
setReadTimeoutin classURLConnection
-
setRequestProperty
public void setRequestProperty(String key, String value)
Deprecated.- Overrides:
setRequestPropertyin classURLConnection
-
addRequestProperty
public void addRequestProperty(String key, String value)
Deprecated.- Overrides:
addRequestPropertyin classURLConnection
-
getRequestProperty
public String getRequestProperty(String key)
Deprecated.- Overrides:
getRequestPropertyin classURLConnection
-
getRequestProperties
public Map<String,List<String>> getRequestProperties()
Deprecated.- Overrides:
getRequestPropertiesin classURLConnection
-
setInstanceFollowRedirects
public void setInstanceFollowRedirects(boolean instanceFollowRedirects)
Deprecated.- Overrides:
setInstanceFollowRedirectsin classHttpURLConnection
-
getInstanceFollowRedirects
public boolean getInstanceFollowRedirects()
Deprecated.- Overrides:
getInstanceFollowRedirectsin classHttpURLConnection
-
setRequestMethod
public void setRequestMethod(String requestMethod) throws ProtocolException
Deprecated.- Overrides:
setRequestMethodin classHttpURLConnection- Throws:
ProtocolException
-
getRequestMethod
public String getRequestMethod()
Deprecated.- Overrides:
getRequestMethodin classHttpURLConnection
-
getResponseCode
public int getResponseCode() throws IOExceptionDeprecated.- Overrides:
getResponseCodein classHttpURLConnection- Throws:
IOException
-
getResponseMessage
public String getResponseMessage() throws IOException
Deprecated.- Overrides:
getResponseMessagein classHttpURLConnection- Throws:
IOException
-
disconnect
public void disconnect()
Deprecated.- Specified by:
disconnectin classHttpURLConnection
-
usingProxy
public boolean usingProxy()
Deprecated.- Specified by:
usingProxyin classHttpURLConnection
-
getErrorStream
public InputStream getErrorStream()
Deprecated.- Overrides:
getErrorStreamin classHttpURLConnection
-
-