Java Doc for FreezableMutableURI.java in  » Library » Apache-beehive-1.0.2-src » org » apache » beehive » netui » core » urls » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Library » Apache beehive 1.0.2 src » org.apache.beehive.netui.core.urls 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.beehive.netui.core.urls.MutableURI
      org.apache.beehive.netui.core.urls.FreezableMutableURI

FreezableMutableURI
public class FreezableMutableURI extends MutableURI (Code)
A mutable class for creating URIs that can be set to "frozen" such that it becomes immutable. After this class is frozen, any calls to methods to set the data components of the URI will throw



Constructor Summary
public  FreezableMutableURI()
     Constructs a FreezableMutableURI.
public  FreezableMutableURI(String uriString, boolean encoded)
     Constructs a FreezableMutableURI.
public  FreezableMutableURI(String scheme, String userInfo, String host, int port, String path, String query, String fragment)
     Constructs a FreezableMutableURI.
public  FreezableMutableURI(URI uri)
     Constructs a FreezableMutableURI.
public  FreezableMutableURI(URL url)
     Constructs a FreezableMutableURI.

This is just a convenience constructor that functions the same as FreezableMutableURI.FreezableMutableURI(URI) constructor with java.net.URL.toURI as the argument.


Method Summary
public  voidaddParameter(String name, String value, boolean encoded)
     Add a parameter for the query string.

If the encoded flag is true then this method assumes that the name and value do not need encoding or are already encoded correctly.

public  voidaddParameters(Map newParams, boolean encoded)
     Add a parameter to the query string.

If the encoded flag is true then this method assumes that the name and value do not need encoding or are already encoded correctly.

public  booleanequals(Object o)
    
public  inthashCode()
    
final public  booleanisFrozen()
    
public  voidremoveParameter(String name)
     Removes the given parameter.
public  voidsetEncoding(String encoding)
     Set the encoding used when adding unencoded parameters.
public  voidsetFragment(String fragment)
     Sets the fragment.
public  voidsetFrozen(boolean frozen)
     Sets a flag indicating that the URI is immutable (or not).
public  voidsetHost(String host)
     Sets the host.
public  voidsetOpaque(String scheme, String schemeSpecificPart)
     Sets the URI to be opaque using the given scheme and schemeSpecificPart.

From URI : "A URI is opaque if, and only if, it is absolute and its scheme-specific part does not begin with a slash character ('/').

public  voidsetPath(String path)
     Sets the path.
public  voidsetPort(int port)
     Sets the port.
public  voidsetQuery(String query)
     Sets (and resets) the query string.
public  voidsetScheme(String scheme)
     Sets the protocol/scheme.
public  voidsetURI(String uriString, boolean encoded)
     Reset the value of the FreezableMutableURI.
public  voidsetUserInfo(String userInfo)
     Sets the userInfo.


Constructor Detail
FreezableMutableURI
public FreezableMutableURI()(Code)
Constructs a FreezableMutableURI.



FreezableMutableURI
public FreezableMutableURI(String uriString, boolean encoded) throws URISyntaxException(Code)
Constructs a FreezableMutableURI.
Parameters:
  uriString - the string to be parsed into a URI
Parameters:
  encoded - Flag indicating whether the string isalready encoded.



FreezableMutableURI
public FreezableMutableURI(String scheme, String userInfo, String host, int port, String path, String query, String fragment)(Code)
Constructs a FreezableMutableURI.
Parameters:
  scheme - the name of the protocol to use
Parameters:
  userInfo - the username and password
Parameters:
  host - the name of the host
Parameters:
  port - the port number on the host
Parameters:
  path - the file on the host
Parameters:
  query - the query part of this URI
Parameters:
  fragment - the fragment part of this URI (internal reference in the URL)



FreezableMutableURI
public FreezableMutableURI(URI uri)(Code)
Constructs a FreezableMutableURI.
Parameters:
  uri - the initial value for this mutable URI



FreezableMutableURI
public FreezableMutableURI(URL url) throws URISyntaxException(Code)
Constructs a FreezableMutableURI.

This is just a convenience constructor that functions the same as FreezableMutableURI.FreezableMutableURI(URI) constructor with java.net.URL.toURI as the argument.

Note, any URL instance that complies with RFC 2396 can be converted to a URI. However, some URLs that are not strictly in compliance can not be converted to a URI. See java.net.URL


Parameters:
  url - the initial value for this mutable URI
exception:
  URISyntaxException - if this URL is not formatted strictlyto RFC2396 and cannot be converted to a URI.
See Also:   java.net.URL.toURI




Method Detail
addParameter
public void addParameter(String name, String value, boolean encoded)(Code)
Add a parameter for the query string.

If the encoded flag is true then this method assumes that the name and value do not need encoding or are already encoded correctly. Otherwise, it translates the name and value with the character encoding of this URI and adds them to the set of parameters for the query. If the encoding for this URI has not been set, then the default encoding used is "UTF-8".

Multiple values for the same parameter can be set by calling this method multiple times with the same name.


Parameters:
  name - name
Parameters:
  value - value
Parameters:
  encoded - Flag indicating whether the names and values arealready encoded.



addParameters
public void addParameters(Map newParams, boolean encoded)(Code)
Add a parameter to the query string.

If the encoded flag is true then this method assumes that the name and value do not need encoding or are already encoded correctly. Otherwise, it translates the name and value with the character encoding of this URI and adds them to the set of parameters for the query. If the encoding for this URI has not been set, then the default encoding used is "UTF-8".


Parameters:
  newParams - the map of new parameters to add to the URI
Parameters:
  encoded - Flag indicating whether the names and values arealready encoded.



equals
public boolean equals(Object o)(Code)



hashCode
public int hashCode()(Code)



isFrozen
final public boolean isFrozen()(Code)



removeParameter
public void removeParameter(String name)(Code)
Removes the given parameter.
Parameters:
  name - name



setEncoding
public void setEncoding(String encoding)(Code)
Set the encoding used when adding unencoded parameters.
Parameters:
  encoding -



setFragment
public void setFragment(String fragment)(Code)
Sets the fragment.
Parameters:
  fragment - fragment



setFrozen
public void setFrozen(boolean frozen)(Code)
Sets a flag indicating that the URI is immutable (or not).
Parameters:
  frozen - flag to indicate if the URI is now immutable or not.



setHost
public void setHost(String host)(Code)
Sets the host.
Parameters:
  host - host



setOpaque
public void setOpaque(String scheme, String schemeSpecificPart)(Code)
Sets the URI to be opaque using the given scheme and schemeSpecificPart.

From URI : "A URI is opaque if, and only if, it is absolute and its scheme-specific part does not begin with a slash character ('/'). An opaque URI has a scheme, a scheme-specific part, and possibly a fragment; all other components are undefined."


Parameters:
  scheme - the scheme component of this URI
Parameters:
  schemeSpecificPart - the scheme-specific part of this URI



setPath
public void setPath(String path)(Code)
Sets the path.
Parameters:
  path - path



setPort
public void setPort(int port)(Code)
Sets the port.
Parameters:
  port - port



setQuery
public void setQuery(String query)(Code)
Sets (and resets) the query string. This method assumes that the query is already encoded and the parameter delimiter is the '&' character.
Parameters:
  query - Query string



setScheme
public void setScheme(String scheme)(Code)
Sets the protocol/scheme.
Parameters:
  scheme - protocol/scheme



setURI
public void setURI(String uriString, boolean encoded) throws URISyntaxException(Code)
Reset the value of the FreezableMutableURI.

This method can also be used to clear the FreezableMutableURI.
Parameters:
  uriString - the string to be parsed into a URI
Parameters:
  encoded - Flag indicating whether the string isalready encoded.




setUserInfo
public void setUserInfo(String userInfo)(Code)
Sets the userInfo.
Parameters:
  userInfo - userInfo



Fields inherited from org.apache.beehive.netui.core.urls.MutableURI
final public static String DEFAULT_ENCODING(Code)(Java Doc)
final public static int UNDEFINED_PORT(Code)(Java Doc)

Methods inherited from org.apache.beehive.netui.core.urls.MutableURI
public void addParameter(String name, String value, boolean encoded)(Code)(Java Doc)
public void addParameters(Map newParams, boolean encoded)(Code)(Java Doc)
public static String encode(String url, String encoding)(Code)(Java Doc)
public String encode(String url)(Code)(Java Doc)
protected static URI encodeURI(String original) throws URISyntaxException(Code)(Java Doc)
public boolean equals(Object object)(Code)(Java Doc)
public static URIContext getDefaultContext()(Code)(Java Doc)
public String getEncoding()(Code)(Java Doc)
public String getFragment()(Code)(Java Doc)
public String getHost()(Code)(Java Doc)
public String getParameter(String name)(Code)(Java Doc)
public List getParameters(String name)(Code)(Java Doc)
public Map getParameters()(Code)(Java Doc)
public String getPath()(Code)(Java Doc)
public int getPort()(Code)(Java Doc)
public String getQuery(URIContext uriContext)(Code)(Java Doc)
public String getScheme()(Code)(Java Doc)
public String getSchemeSpecificPart()(Code)(Java Doc)
public String getURIString(URIContext uriContext)(Code)(Java Doc)
public String getUserInfo()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
protected static int indexFirstOf(String s, String delims, int offset)(Code)(Java Doc)
public boolean isAbsolute()(Code)(Java Doc)
public boolean isOpaque()(Code)(Java Doc)
public void removeParameter(String name)(Code)(Java Doc)
public void setEncoding(String encoding)(Code)(Java Doc)
public void setFragment(String fragment)(Code)(Java Doc)
public void setHost(String host)(Code)(Java Doc)
public void setOpaque(String scheme, String schemeSpecificPart)(Code)(Java Doc)
public void setPath(String path)(Code)(Java Doc)
public void setPort(int port)(Code)(Java Doc)
public void setQuery(String query)(Code)(Java Doc)
public void setScheme(String scheme)(Code)(Java Doc)
protected void setSchemeSpecificPart(String schemeSpecificPart)(Code)(Java Doc)
public void setURI(String uriString, boolean encoded) throws URISyntaxException(Code)(Java Doc)
public void setURI(URI uri)(Code)(Java Doc)
public void setUserInfo(String userInfo)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.