public class DirContextURLConnection extends URLConnection
Note: All the object attribute names are the WebDAV names, not the HTTP names, so this class overrides some methods from URLConnection to do the queries using the right names. Content handler is also not used; the content is directly returned.
Modifier and Type | Field and Description |
---|---|
protected Attributes |
attributes
Attributes.
|
protected DirContext |
collection
Associated DirContext.
|
protected DirContext |
context
Directory context.
|
protected long |
date
Date.
|
protected Object |
object
Other unknown object.
|
protected Permission |
permission
Permission
|
protected Resource |
resource
Associated resource.
|
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches
Constructor and Description |
---|
DirContextURLConnection(DirContext context,
URL url) |
Modifier and Type | Method and Description |
---|---|
void |
connect()
Connect to the DirContext, and retrieve the bound object, as well as
its attributes.
|
Object |
getContent()
Get object content.
|
Object |
getContent(Class[] classes)
Get object content.
|
int |
getContentLength()
Return the content length value.
|
String |
getContentType()
Return the content type value.
|
long |
getDate()
Return the last modified date.
|
String |
getHeaderField(String name)
Returns the name of the specified header field.
|
Map<String,List<String>> |
getHeaderFields()
Returns an unmodifiable Map of the header fields.
|
protected String |
getHeaderValueAsString(Object headerValue) |
InputStream |
getInputStream()
Get input stream.
|
long |
getLastModified()
Return the last modified date.
|
Permission |
getPermission()
Get the Permission for this URL
|
Enumeration<String> |
list()
List children of this collection.
|
addRequestProperty, getAllowUserInteraction, getConnectTimeout, getContentEncoding, getContentLengthLong, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getHeaderFieldLong, getIfModifiedSince, getOutputStream, getReadTimeout, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setReadTimeout, setRequestProperty, setUseCaches, toString
protected DirContext context
protected Resource resource
protected DirContext collection
protected Object object
protected Attributes attributes
protected long date
protected Permission permission
public DirContextURLConnection(DirContext context, URL url)
public void connect() throws IOException
connect
in class URLConnection
IOException
- Object not foundpublic int getContentLength()
getContentLength
in class URLConnection
public String getContentType()
getContentType
in class URLConnection
public long getDate()
getDate
in class URLConnection
public long getLastModified()
getLastModified
in class URLConnection
public Map<String,List<String>> getHeaderFields()
getHeaderFields
in class URLConnection
public String getHeaderField(String name)
getHeaderField
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 InputStream getInputStream() throws IOException
getInputStream
in class URLConnection
IOException
public Permission getPermission()
getPermission
in class URLConnection
public Enumeration<String> list() throws IOException
IOException
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.