JarURLConnection (Java SE 26 & JDK 26)
-
Field Summary
Fields
The connection to the JAR file URL, if the connection has been initiated.
Fields declared in class URLConnection
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCachesprotected booleanIf
true, thisURLis being examined in a context in which it makes sense to allow user interactions such as popping up an authentication dialog.protected booleanIf
false, this connection object has not created a communications link to the specified URL.protected booleanThis variable is set by the
setDoInputmethod.protected booleanThis variable is set by the
setDoOutputmethod.protected longSome protocols support skipping the fetching of the object unless the object has been modified more recently than a certain time.
protected URLThe URL represents the remote object on the World Wide Web to which this connection is opened.
protected booleanIf
true, the protocol is allowed to use caching whenever it can. -
Constructor Summary
Constructors
protectedCreates the new JarURLConnection to the specified URL.
-
Method Summary
Return the Attributes object for this connection if the URL for it points to a JAR file entry, null otherwise.
Returns the Certificate objects for this connection if the URL for it points to a JAR file entry, null otherwise.
Return the entry name for this connection.
Return the JAR entry object for this connection, if any.
Return the JAR file for this connection.
Returns the URL for the Jar file for this connection.
Returns the main Attributes for the JAR file for this connection.
Returns the Manifest for this connection, or null if none.
Methods declared in class URLConnection
addRequestProperty, connect, getAllowUserInteraction, getConnectTimeout, getContent, getContent, getContentEncoding, getContentLength, getContentLengthLong, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getHeaderFieldLong, getHeaderFields, getIfModifiedSince, getInputStream, getLastModified, getOutputStream, getPermission, getReadTimeout, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setReadTimeout, setRequestProperty, setUseCaches, toStringvoidAdds a general request property specified by a key-value pair.
abstract voidOpens a communications link to the resource referenced by this URL, if such a connection has not already been established.
booleanReturns the value of the
allowUserInteractionfield for this object.intReturns setting for connect timeout.
Retrieves the contents of this URL connection.
Retrieves the contents of this URL connection.
Returns the value of the
content-encodingheader field.intReturns the value of the
content-lengthheader field.longReturns the value of the
content-lengthheader field as a long.Returns the value of the
content-typeheader field.longReturns the value of the
dateheader field.static booleanReturns the default value of the
allowUserInteractionfield.booleanReturns the default value of a
URLConnection'suseCachesflag.static booleanReturns the default value of the
useCachesflag for the given protocol.booleanReturns the value of this
URLConnection'sdoInputflag.booleanReturns the value of this
URLConnection'sdoOutputflag.longReturns the value of the
expiresheader field.Loads filename map (a mimetable) from a data file.
Returns the value for the
nth header field.Returns the value of the named header field.
longReturns the value of the named field parsed as date.
intReturns the value of the named field parsed as a number.
Returns the key for the
nth header field.longReturns the value of the named field parsed as a number.
Returns an unmodifiable Map of the header fields.
longReturns the value of this object's
ifModifiedSincefield.Returns an input stream that reads from this open connection.
longReturns the value of the
last-modifiedheader field.Returns an output stream that writes to this connection.
Deprecated, for removal: This API element is subject to removal in a future version.
intReturns setting for read timeout. 0 return implies that the option is disabled (i.e., timeout of infinity).
Returns an unmodifiable Map of general request properties for this connection.
Returns the value of the named general request property for this connection.
Returns the value of this
URLConnection'sURLfield.booleanReturns the value of this
URLConnection'suseCachesfield.Tries to determine the content type of an object, based on the specified "file" component of a URL.
Tries to determine the type of an input stream based on the characters at the beginning of the input stream.
voidSet the value of the
allowUserInteractionfield of thisURLConnection.voidSets a specified timeout value, in milliseconds, to be used when opening a communications link to the resource referenced by this URLConnection.
static voidSets the
ContentHandlerFactoryof an application.static voidSets the default value of the
allowUserInteractionfield for all futureURLConnectionobjects to the specified value.static voidvoidSets the default value of the
useCachesfield to the specified value.static voidSets the default value of the
useCachesfield for the named protocol to the given value.voidSets the value of the
doInputfield for thisURLConnectionto the specified value.voidSets the value of the
doOutputfield for thisURLConnectionto the specified value.static voidvoidSets the value of the
ifModifiedSincefield of thisURLConnectionto the specified value.voidSets the read timeout to a specified timeout, in milliseconds.
voidSets the general request property.
voidSets the value of the
useCachesfield of thisURLConnectionto the specified value.Returns a
Stringrepresentation of this URL connection.Methods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitCreates and returns a copy of this object.
booleanIndicates whether some other object is "equal to" this one.
protected voidDeprecated, for removal: This API element is subject to removal in a future version.
Returns the runtime class of this
Object.intReturns a hash code value for this object.
final voidWakes up a single thread that is waiting on this object's monitor.
final voidWakes up all threads that are waiting on this object's monitor.
final voidCauses the current thread to wait until it is awakened, typically by being notified or interrupted.
final voidwait(long timeoutMillis) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
final voidwait(long timeoutMillis, int nanos) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
-
Field Details
-
jarFileURLConnection
-
-
Constructor Details
-
JarURLConnection
-
-
Method Details
-
getJarFileURL
-
getEntryName
-
getJarFile
-
getManifest
-
getJarEntry
-
getAttributes
-
getMainAttributes
-
getCertificates
-