public class WarURLConnection extends URLConnection
Use Piped streams to avoid having to create temporary files.
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches| Constructor and Description |
|---|
WarURLConnection(URL url,
Manifest mf) |
getContentLengthLong, getDefaultAllowUserInteraction, getDefaultRequestProperty, getFileNameMap, getHeaderFieldLong, guessContentTypeFromName, guessContentTypeFromStream, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setFileNameMap, toStringpublic WarURLConnection(URL url, Manifest mf) throws IOException
url - The file url (for example)mf - The manifest to use as a replacement to the jar file inside
the file url.IOExceptionpublic static InputStream substitueManifest(Manifest newmanifest, InputStream rawIn) throws IOException
newmanifest - The new manifestrawIn - The file input stream or equivalent. not the jar input stream.IOExceptionpublic void connect()
throws IOException
connect in class URLConnectionIOExceptionpublic InputStream getInputStream() throws IOException
getInputStream in class URLConnectionIOExceptionpublic void addRequestProperty(String key, String value)
addRequestProperty in class URLConnectionpublic boolean getAllowUserInteraction()
getAllowUserInteraction in class URLConnectionpublic int getConnectTimeout()
getConnectTimeout in class URLConnectionpublic Object getContent() throws IOException
getContent in class URLConnectionIOExceptionpublic Object getContent(Class[] classes) throws IOException
getContent in class URLConnectionIOExceptionpublic String getContentEncoding()
getContentEncoding in class URLConnectionpublic int getContentLength()
getContentLength in class URLConnectionpublic String getContentType()
getContentType in class URLConnectionpublic long getDate()
getDate in class URLConnectionpublic boolean getDefaultUseCaches()
getDefaultUseCaches in class URLConnectionpublic boolean getDoInput()
getDoInput in class URLConnectionpublic boolean getDoOutput()
getDoOutput in class URLConnectionpublic long getExpiration()
getExpiration in class URLConnectionpublic String getHeaderField(int n)
getHeaderField in class URLConnectionpublic String getHeaderField(String name)
getHeaderField in class URLConnectionpublic long getHeaderFieldDate(String name, long Default)
getHeaderFieldDate in class URLConnectionpublic int getHeaderFieldInt(String name, int Default)
getHeaderFieldInt in class URLConnectionpublic String getHeaderFieldKey(int n)
getHeaderFieldKey in class URLConnectionpublic Map<String,List<String>> getHeaderFields()
getHeaderFields in class URLConnectionpublic long getIfModifiedSince()
getIfModifiedSince in class URLConnectionpublic long getLastModified()
getLastModified in class URLConnectionpublic OutputStream getOutputStream() throws IOException
getOutputStream in class URLConnectionIOExceptionpublic Permission getPermission() throws IOException
getPermission in class URLConnectionIOExceptionpublic int getReadTimeout()
getReadTimeout in class URLConnectionpublic Map<String,List<String>> getRequestProperties()
getRequestProperties in class URLConnectionpublic String getRequestProperty(String key)
getRequestProperty in class URLConnectionpublic URL getURL()
getURL in class URLConnectionpublic boolean getUseCaches()
getUseCaches in class URLConnectionpublic void setAllowUserInteraction(boolean allowuserinteraction)
setAllowUserInteraction in class URLConnectionpublic void setConnectTimeout(int timeout)
setConnectTimeout in class URLConnectionpublic void setDefaultUseCaches(boolean defaultusecaches)
setDefaultUseCaches in class URLConnectionpublic void setDoInput(boolean doinput)
setDoInput in class URLConnectionpublic void setDoOutput(boolean dooutput)
setDoOutput in class URLConnectionpublic void setIfModifiedSince(long ifmodifiedsince)
setIfModifiedSince in class URLConnectionpublic void setReadTimeout(int timeout)
setReadTimeout in class URLConnectionpublic void setRequestProperty(String key, String value)
setRequestProperty in class URLConnectionpublic void setUseCaches(boolean usecaches)
setUseCaches in class URLConnectionCopyright © 1995-2015 Webtide. All Rights Reserved.