org.apache.naming.resources
Class DirContextURLConnection
URLConnection
org.apache.naming.resources.DirContextURLConnection
public class DirContextURLConnection
extends URLConnection
Connection to a JNDI directory context.
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.
Version:
- Remy Maucherat
void | connect() - Connect to the DirContext, and retrive 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.
|
InputStream | getInputStream() - Get input stream.
|
long | getLastModified() - Return the last modified date.
|
Permission | getPermission() - Get the Permission for this URL
|
Enumeration | list() - List children of this collection.
|
attributes
protected Attributes attributes
Attributes.
collection
protected DirContext collection
Associated DirContext.
context
protected DirContext context
Directory context.
date
protected long date
Date.
object
protected Object object
Other unknown object.
permission
protected Permission permission
Permission
resource
protected Resource resource
Associated resource.
DirContextURLConnection
public DirContextURLConnection(DirContext context,
URL url)
connect
public void connect()
throws IOException
Connect to the DirContext, and retrive the bound object, as well as
its attributes. If no object is bound with the name specified in the
URL, then an IOException is thrown.
getContent
public Object getContent()
throws IOException
Get object content.
getContent
public Object getContent(Class[] classes)
throws IOException
Get object content.
getContentLength
public int getContentLength()
Return the content length value.
getContentType
public String getContentType()
Return the content type value.
getDate
public long getDate()
Return the last modified date.
getHeaderField
public String getHeaderField(String name)
Returns the name of the specified header field.
getInputStream
public InputStream getInputStream()
throws IOException
Get input stream.
getLastModified
public long getLastModified()
Return the last modified date.
getPermission
public Permission getPermission()
Get the Permission for this URL
list
public Enumeration list()
throws IOException
List children of this collection. The names given are relative to this
URI's path. The full uri of the children is then : path + "/" + name.
Copyright B) 2000-2003 Apache Software Foundation. All Rights Reserved.