|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.shared.ldap.codec.util.LdapString
org.apache.directory.shared.ldap.codec.util.LdapURL
Decodes a LdapUrl, and checks that it complies with the RFC 2255. The grammar is the following : ldapurl = scheme "://" [hostport] ["/" [dn ["?" [attributes] ["?" [scope] ["?" [filter] ["?" extensions]]]]]] scheme = "ldap" attributes = attrdesc *("," attrdesc) scope = "base" / "one" / "sub" dn = LdapDN hostport = hostport from Section 5 of RFC 1738 attrdesc = AttributeDescription from Section 4.1.5 of RFC 2251 filter = filter from Section 4 of RFC 2254 extensions = extension *("," extension) extension = ["!"] extype ["=" exvalue] extype = token / xtoken exvalue = LDAPString token = oid from section 4.1 of RFC 2252 xtoken = ("X-" / "x-") token
Field Summary | |
static LdapURL |
EMPTY_URL
A null LdapURL |
Fields inherited from class org.apache.directory.shared.ldap.codec.util.LdapString |
bytes, EMPTY_BYTES, EMPTY_STRING, string |
Constructor Summary | |
LdapURL()
Construct an empty LdapURL |
|
LdapURL(byte[] bytes)
Create a new LdapURL after having parsed it. |
|
LdapURL(java.lang.String string)
Create a new LdapURL from a String after having parsed it. |
Method Summary | |
static byte[] |
getAsciiBytes(java.lang.String data)
Converts the specified string to byte array of ASCII characters. |
java.util.ArrayList |
getAttributes()
|
java.util.HashMap |
getCriticalExtensions()
|
LdapDN |
getDn()
|
java.util.HashMap |
getExtensions()
|
java.lang.String |
getFilter()
|
java.lang.String |
getHost()
|
int |
getPort()
|
java.lang.String |
getScheme()
|
int |
getScope()
|
static java.lang.String |
getString(byte[] data,
int offset,
int length,
java.lang.String charset)
From commons-httpclients. |
static java.lang.String |
getString(byte[] data,
java.lang.String charset)
From commons-httpclients. |
void |
parse(char[] chars)
|
java.lang.String |
toString()
Get a string representation of a LdapURL. |
Methods inherited from class org.apache.directory.shared.ldap.codec.util.LdapString |
getBytes, getNbBytes, getString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final transient LdapURL EMPTY_URL
Constructor Detail |
public LdapURL()
public LdapURL(java.lang.String string) throws LdapURLEncodingException
string
- TheString that contains the LDAPURL
org.apache.directory.shared.asn1.codec.DecoderException
- If the String does not comply with RFC 2255
LdapURLEncodingException
public LdapURL(byte[] bytes) throws LdapURLEncodingException
bytes
- The byte buffer that contains the LDAPURL
org.apache.directory.shared.asn1.codec.DecoderException
- If the byte array does not comply with RFC 2255
LdapURLEncodingException
Method Detail |
public void parse(char[] chars) throws LdapURLEncodingException
LdapURLEncodingException
public static java.lang.String getString(byte[] data, int offset, int length, java.lang.String charset)
data
- the byte array to be encodedoffset
- the index of the first byte to encodelength
- the number of bytes to encodecharset
- the desired character encoding
public static java.lang.String getString(byte[] data, java.lang.String charset)
data
- the byte array to be encodedcharset
- the desired character encoding
public static byte[] getAsciiBytes(java.lang.String data)
data
- the string to be encoded
public java.lang.String toString()
toString
in class LdapString
public java.util.ArrayList getAttributes()
public java.util.HashMap getCriticalExtensions()
public LdapDN getDn()
public java.util.HashMap getExtensions()
public java.lang.String getFilter()
public java.lang.String getHost()
public int getPort()
public int getScope()
public java.lang.String getScheme()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |