public class ContentUrlConnection extends URLConnection
URLConnection that wraps a Content.| Modifier and Type | Field and Description |
|---|---|
protected boolean |
connected |
protected org.craftercms.core.service.Content |
content |
protected String |
contentType |
protected Map<String,String> |
headers |
protected boolean |
initializedHeaders |
protected InputStream |
is |
protected long |
lastModified |
protected long |
length |
allowUserInteraction, doInput, doOutput, ifModifiedSince, url, useCaches| Constructor and Description |
|---|
ContentUrlConnection(URL url,
org.craftercms.core.service.Content content) |
| Modifier and Type | Method and Description |
|---|---|
void |
connect() |
int |
getContentLength() |
String |
getHeaderField(int n) |
String |
getHeaderField(String name) |
String |
getHeaderFieldKey(int n) |
InputStream |
getInputStream() |
long |
getLastModified() |
protected void |
initializeHeaders() |
addRequestProperty, getAllowUserInteraction, getConnectTimeout, getContent, getContent, getContentEncoding, getContentLengthLong, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldLong, getHeaderFields, getIfModifiedSince, getOutputStream, getPermission, getReadTimeout, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setReadTimeout, setRequestProperty, setUseCaches, toStringprotected org.craftercms.core.service.Content content
protected String contentType
protected long length
protected long lastModified
protected InputStream is
protected boolean connected
protected boolean initializedHeaders
public ContentUrlConnection(URL url, org.craftercms.core.service.Content content)
public void connect()
throws IOException
connect in class URLConnectionIOExceptionpublic InputStream getInputStream() throws IOException
getInputStream in class URLConnectionIOExceptionprotected void initializeHeaders()
public String getHeaderField(String name)
getHeaderField in class URLConnectionpublic String getHeaderField(int n)
getHeaderField in class URLConnectionpublic String getHeaderFieldKey(int n)
getHeaderFieldKey in class URLConnectionpublic int getContentLength()
getContentLength in class URLConnectionpublic long getLastModified()
getLastModified in class URLConnectionCopyright © 2014 CrafterCMS. All Rights Reserved.