Java Doc for Tools.java in  » Portal » jboss-portal-2.6.4 » org » jboss » portal » migration » helper » 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 » Portal » jboss portal 2.6.4 » org.jboss.portal.migration.helper 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jboss.portal.migration.helper.Tools

Tools
public class Tools (Code)

author:
   Julien Viet
author:
   Thomas Heute
version:
   $Revision: 8784 $


Field Summary
final public static  intDEFAULT_BUFFER_SIZE
    
final public static  ResourceBundleEMPTY_BUNDLE
    
final public static  EnumerationEMPTY_ENUMERATION
    
final public static  IteratorEMPTY_ITERATOR
    
final public static  StringRE_EMAIL_VALIDATION
    
final public static  StringVMID
     16 chars long VMID.
final public static  Loggerlog
    


Method Summary
public static  StringbuildClassLoaderInfo(ClassLoader loader)
    
public static  intcomputeStringHash(int hash, String s)
    
public static  booleanconfirmTemporaryHash(String hash, String value, long time)
    
public static  voidcopy(InputStream in, OutputStream out)
     Pipe an input stream in an output stream.
public static  voidcopy(InputStream in, OutputStream out, int bufferSize)
     Pipe an incoming stream in an outcoming stream.
public static  StringdecodeXWWWFormURL(String s)
    
public static  StringdumpClassLoaderHierarchyInfo(ClassLoader loader)
    
public static  voiddumpClassLoaderHierarchyInfo(Writer writer, ClassLoader loader)
    
public static  voiddumpClassLoaderHierarchyInfo(Logger log, ClassLoader loader)
    
public static  voiddumpClassLoaderHierarchyInfo(Logger log, Level level, ClassLoader loader)
    
public static  StringencodeXWWWFormURL(String s)
    
public static  booleanexists(URL url)
    
public static  byte[]fromHexString(String hex)
     Returns a byte array converted from the hexadecimal format.
public static  StringgenerateTemporaryHash(String value, long time)
    
public static  booleanisEmailValid(String address)
     Return true is the address is not null and matches the email validation regular expression.
public static  Iteratoriterator(Object o)
    
public static  Iteratoriterator(Object[] objects)
    
public static  byte[]md5(String text)
     Computes an md5 hash of a string.
public static  Stringmd5AsHexString(String text)
     Computes an md5 hash and returns the result as a string in hexadecimal format.
public static  Stringreplace(String string, String pattern, String replacement)
     Replace occurence in a string.
public static  voidsafeClose(Object closable)
     Close an object that implements a close() method.
public static  voidsafeClose(OutputStream out)
     Close an output stream safely.
public static  voidsafeClose(InputStream in)
     Close an input stream safely.
public static  voidsafeClose(Reader reader)
     Close a reader safely.
public static  EnumerationtoEnumeration(Iterator iterator)
    
public static  StringtoHexString(byte[] bytes)
     Returns a string in the hexadecimal format.
public static  ListtoList(Enumeration e)
    
public static  ListtoList(Iterator iterator)
    
public static  SettoSet(Enumeration e)
    
public static  SettoSet(Object[] objects)
    
public static  SettoSet(Iterator iterator)
    

Field Detail
DEFAULT_BUFFER_SIZE
final public static int DEFAULT_BUFFER_SIZE(Code)



EMPTY_BUNDLE
final public static ResourceBundle EMPTY_BUNDLE(Code)



EMPTY_ENUMERATION
final public static Enumeration EMPTY_ENUMERATION(Code)



EMPTY_ITERATOR
final public static Iterator EMPTY_ITERATOR(Code)



RE_EMAIL_VALIDATION
final public static String RE_EMAIL_VALIDATION(Code)



VMID
final public static String VMID(Code)
16 chars long VMID.



log
final public static Logger log(Code)





Method Detail
buildClassLoaderInfo
public static String buildClassLoaderInfo(ClassLoader loader)(Code)



computeStringHash
public static int computeStringHash(int hash, String s)(Code)



confirmTemporaryHash
public static boolean confirmTemporaryHash(String hash, String value, long time)(Code)



copy
public static void copy(InputStream in, OutputStream out) throws IOException(Code)
Pipe an input stream in an output stream.
Parameters:
  in - the incoming stream
Parameters:
  out - the outcoming stream
throws:
  NullPointerException - if an argument is null
throws:
  IllegalArgumentException - if bufferSize < 1



copy
public static void copy(InputStream in, OutputStream out, int bufferSize) throws IOException(Code)
Pipe an incoming stream in an outcoming stream.
Parameters:
  in - the incoming stream
Parameters:
  out - the outcoming stream
Parameters:
  bufferSize - the buffer size
throws:
  NullPointerException - if an argument is null
throws:
  IllegalArgumentException - if bufferSize < 1



decodeXWWWFormURL
public static String decodeXWWWFormURL(String s)(Code)



dumpClassLoaderHierarchyInfo
public static String dumpClassLoaderHierarchyInfo(ClassLoader loader)(Code)



dumpClassLoaderHierarchyInfo
public static void dumpClassLoaderHierarchyInfo(Writer writer, ClassLoader loader)(Code)



dumpClassLoaderHierarchyInfo
public static void dumpClassLoaderHierarchyInfo(Logger log, ClassLoader loader)(Code)



dumpClassLoaderHierarchyInfo
public static void dumpClassLoaderHierarchyInfo(Logger log, Level level, ClassLoader loader)(Code)



encodeXWWWFormURL
public static String encodeXWWWFormURL(String s)(Code)



exists
public static boolean exists(URL url)(Code)



fromHexString
public static byte[] fromHexString(String hex)(Code)
Returns a byte array converted from the hexadecimal format.
Parameters:
  hex - the string to convert the byte array corresponding
throws:
  IllegalArgumentException - if the string is null or does not have the good format



generateTemporaryHash
public static String generateTemporaryHash(String value, long time)(Code)



isEmailValid
public static boolean isEmailValid(String address)(Code)
Return true is the address is not null and matches the email validation regular expression.



iterator
public static Iterator iterator(Object o)(Code)



iterator
public static Iterator iterator(Object[] objects)(Code)



md5
public static byte[] md5(String text)(Code)
Computes an md5 hash of a string.
Parameters:
  text - the hashed string the string hash
throws:
  NullPointerException - if text is null



md5AsHexString
public static String md5AsHexString(String text)(Code)
Computes an md5 hash and returns the result as a string in hexadecimal format.
Parameters:
  text - the hashed string the string hash
throws:
  NullPointerException - if text is null



replace
public static String replace(String string, String pattern, String replacement)(Code)
Replace occurence in a string.
Parameters:
  string - the source string
Parameters:
  pattern - the replaced pattern
Parameters:
  replacement - the replacement text the new string



safeClose
public static void safeClose(Object closable)(Code)
Close an object that implements a close() method.
Parameters:
  closable - the object to close



safeClose
public static void safeClose(OutputStream out)(Code)
Close an output stream safely.
Parameters:
  out - the stream to close



safeClose
public static void safeClose(InputStream in)(Code)
Close an input stream safely.
Parameters:
  in - the stream to close



safeClose
public static void safeClose(Reader reader)(Code)
Close a reader safely.
Parameters:
  reader - the stream to close



toEnumeration
public static Enumeration toEnumeration(Iterator iterator)(Code)



toHexString
public static String toHexString(byte[] bytes)(Code)
Returns a string in the hexadecimal format.
Parameters:
  bytes - the converted bytes the hexadecimal string representing the bytes data
throws:
  IllegalArgumentException - if the byte array is null



toList
public static List toList(Enumeration e)(Code)



toList
public static List toList(Iterator iterator)(Code)



toSet
public static Set toSet(Enumeration e)(Code)



toSet
public static Set toSet(Object[] objects)(Code)



toSet
public static Set toSet(Iterator iterator)(Code)



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.