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, toString
public 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.IOException
public static InputStream substitueManifest(Manifest newmanifest, InputStream rawIn) throws IOException
newmanifest
- The new manifestrawIn
- The file input stream or equivalent. not the jar input stream.IOException
public void connect() throws IOException
connect
in class URLConnection
IOException
public InputStream getInputStream() throws IOException
getInputStream
in class URLConnection
IOException
public void addRequestProperty(String key, String value)
addRequestProperty
in class URLConnection
public boolean getAllowUserInteraction()
getAllowUserInteraction
in class URLConnection
public int getConnectTimeout()
getConnectTimeout
in class URLConnection
public Object getContent() throws IOException
getContent
in class URLConnection
IOException
public Object getContent(Class[] classes) throws IOException
getContent
in class URLConnection
IOException
public String getContentEncoding()
getContentEncoding
in class URLConnection
public int getContentLength()
getContentLength
in class URLConnection
public String getContentType()
getContentType
in class URLConnection
public long getDate()
getDate
in class URLConnection
public boolean getDefaultUseCaches()
getDefaultUseCaches
in class URLConnection
public boolean getDoInput()
getDoInput
in class URLConnection
public boolean getDoOutput()
getDoOutput
in class URLConnection
public long getExpiration()
getExpiration
in class URLConnection
public String getHeaderField(int n)
getHeaderField
in class URLConnection
public String getHeaderField(String name)
getHeaderField
in class URLConnection
public long getHeaderFieldDate(String name, long Default)
getHeaderFieldDate
in class URLConnection
public int getHeaderFieldInt(String name, int Default)
getHeaderFieldInt
in class URLConnection
public String getHeaderFieldKey(int n)
getHeaderFieldKey
in class URLConnection
public Map<String,List<String>> getHeaderFields()
getHeaderFields
in class URLConnection
public long getIfModifiedSince()
getIfModifiedSince
in class URLConnection
public long getLastModified()
getLastModified
in class URLConnection
public OutputStream getOutputStream() throws IOException
getOutputStream
in class URLConnection
IOException
public Permission getPermission() throws IOException
getPermission
in class URLConnection
IOException
public int getReadTimeout()
getReadTimeout
in class URLConnection
public Map<String,List<String>> getRequestProperties()
getRequestProperties
in class URLConnection
public String getRequestProperty(String key)
getRequestProperty
in class URLConnection
public URL getURL()
getURL
in class URLConnection
public boolean getUseCaches()
getUseCaches
in class URLConnection
public void setAllowUserInteraction(boolean allowuserinteraction)
setAllowUserInteraction
in class URLConnection
public void setConnectTimeout(int timeout)
setConnectTimeout
in class URLConnection
public void setDefaultUseCaches(boolean defaultusecaches)
setDefaultUseCaches
in class URLConnection
public void setDoInput(boolean doinput)
setDoInput
in class URLConnection
public void setDoOutput(boolean dooutput)
setDoOutput
in class URLConnection
public void setIfModifiedSince(long ifmodifiedsince)
setIfModifiedSince
in class URLConnection
public void setReadTimeout(int timeout)
setReadTimeout
in class URLConnection
public void setRequestProperty(String key, String value)
setRequestProperty
in class URLConnection
public void setUseCaches(boolean usecaches)
setUseCaches
in class URLConnection
Copyright © 1995-2015 Webtide. All Rights Reserved.