Java Doc for StringUtils.java in  » Database-ORM » JPOX » org » jpox » util » 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 » Database ORM » JPOX » org.jpox.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jpox.util.StringUtils

StringUtils
public class StringUtils (Code)
Utilities for String manipulation.
version:
   $Revision: 1.23 $




Method Summary
public static  booleanareStringsEqual(String str1, String str2)
     Utility to tell if two strings are the same.
public static  StringbooleanArrayToString(boolean[] ba)
     Utility to convert a boolean[] to a String.
public static  StringcollectionToString(Collection coll)
     Converts the given collection of objects to string as a comma-separated list.
public static  StringgetDecodedStringFromURLString(String urlString)
    
public static  FilegetFileForFilename(String filename)
     Convenience method to get a File for the specified filename.
public static  intgetIntValueForProperty(Properties props, String propName, int defaultValue)
     Convenience method to extract an integer property value from a Properties file.
public static  JarFilegetJarFileForFilename(String filename)
     Convenience method to get a JarFile for the specified filename.
public static  StringgetStringFromStackTrace(Throwable ex)
    
public static  StringintArrayToString(int[] ia)
     Utility to convert an int[] to a String.
public static  booleanisEmpty(String s)
     check string is null or length is 0.
Parameters:
  s - check string return true if string is null or length is 0.
public static  booleanisValidJavaIdentifierForJDOQL(String s)
     Utility to check if a name is a valid Java identifier.
public static  booleanisWhitespace(String str)
     Utility to check if a string is whitespace.
public static  StringleftAlignedPaddedString(String input, int length)
     Utility to return a left-aligned version of a string padded to the number of characters specified.
public static  booleannotEmpty(String s)
     check string isnot null and length > 0.
Parameters:
  s - check string return true if string isnot null and length greater than 0.
public static  StringobjectArrayToString(Object[] arr)
     Utility to convert an Object[] to a String.
public static  StringreplaceAll(String theString, String toReplace, String replacement)
     Replaces each substring of this string that matches toReplace. Used to replace replaceAll when using J2SDK 1.3.1. This method is available at String.replaceAll in J2SDK 1.4
Parameters:
  theString - The string to use
Parameters:
  toReplace - The string to replace.
Parameters:
  replacement - The replacement string.
public static  StringrightAlignedPaddedString(String input, int length)
     Utility to return a right-aligned version of a string padded to the number of characters specified.
public static  String[]split(String valuesString, String token)
    
public static  StringtoJVMIDString(Object obj)
     Utility to convert an object to a JVM type string.



Method Detail
areStringsEqual
public static boolean areStringsEqual(String str1, String str2)(Code)
Utility to tell if two strings are the same. Extends the basic String 'equals' method by allowing for nulls.
Parameters:
  str1 - The first string
Parameters:
  str2 - The second string Whether the strings are equal.



booleanArrayToString
public static String booleanArrayToString(boolean[] ba)(Code)
Utility to convert a boolean[] to a String.
Parameters:
  ba - The boolean[] String version



collectionToString
public static String collectionToString(Collection coll)(Code)
Converts the given collection of objects to string as a comma-separated list. If the list is empty the string "<none>" is returned.
Parameters:
  coll - collection of objects to be converted A string containing each object in the given collection,converted toString() and separated by commas.



getDecodedStringFromURLString
public static String getDecodedStringFromURLString(String urlString)(Code)
Convenience method to decode a URL string for use (so spaces are allowed)
Parameters:
  urlString - The URL string The string



getFileForFilename
public static File getFileForFilename(String filename)(Code)
Convenience method to get a File for the specified filename. Caters for URL-encoded characters in the filename (treatment of spaces on Windows etc)
Parameters:
  filename - Name of file The File



getIntValueForProperty
public static int getIntValueForProperty(Properties props, String propName, int defaultValue)(Code)
Convenience method to extract an integer property value from a Properties file.
Parameters:
  props - The Properties
Parameters:
  propName - Name of the property
Parameters:
  defaultValue - The default value to use (in case not specified) The value



getJarFileForFilename
public static JarFile getJarFileForFilename(String filename) throws IOException(Code)
Convenience method to get a JarFile for the specified filename. Caters for URL-encoded characters in the filename (treatment of spaces on Windows etc)
Parameters:
  filename - Name of file The JarFile



getStringFromStackTrace
public static String getStringFromStackTrace(Throwable ex)(Code)
Convert an exception to a String with full stack trace
Parameters:
  ex - the exception a String with the full stacktrace error text



intArrayToString
public static String intArrayToString(int[] ia)(Code)
Utility to convert an int[] to a String.
Parameters:
  ia - The int[] String version



isEmpty
public static boolean isEmpty(String s)(Code)
check string is null or length is 0.
Parameters:
  s - check string return true if string is null or length is 0. return false other case.



isValidJavaIdentifierForJDOQL
public static boolean isValidJavaIdentifierForJDOQL(String s)(Code)
Utility to check if a name is a valid Java identifier. Used by JDOQL in validating the names of parameters/variables.
Parameters:
  s - The name Whether it is a valid identifier in Java.



isWhitespace
public static boolean isWhitespace(String str)(Code)
Utility to check if a string is whitespace. If the string is null, returns true also.
Parameters:
  str - The string to check Whether the string is just whitespace



leftAlignedPaddedString
public static String leftAlignedPaddedString(String input, int length)(Code)
Utility to return a left-aligned version of a string padded to the number of characters specified.
Parameters:
  input - The input string
Parameters:
  length - The length desired The updated string



notEmpty
public static boolean notEmpty(String s)(Code)
check string isnot null and length > 0.
Parameters:
  s - check string return true if string isnot null and length greater than 0. return false other case.



objectArrayToString
public static String objectArrayToString(Object[] arr)(Code)
Utility to convert an Object[] to a String.
Parameters:
  arr - The Object[] String version



replaceAll
public static String replaceAll(String theString, String toReplace, String replacement)(Code)
Replaces each substring of this string that matches toReplace. Used to replace replaceAll when using J2SDK 1.3.1. This method is available at String.replaceAll in J2SDK 1.4
Parameters:
  theString - The string to use
Parameters:
  toReplace - The string to replace.
Parameters:
  replacement - The replacement string. The updated string after replacing.



rightAlignedPaddedString
public static String rightAlignedPaddedString(String input, int length)(Code)
Utility to return a right-aligned version of a string padded to the number of characters specified.
Parameters:
  input - The input string
Parameters:
  length - The length desired The updated string



split
public static String[] split(String valuesString, String token)(Code)
Splits a list of values separated by a token
Parameters:
  valuesString - the text to be splited
Parameters:
  token - the token an array with all values



toJVMIDString
public static String toJVMIDString(Object obj)(Code)
Utility to convert an object to a JVM type string. Returns the same as would have been output from Object.toString() if the class hadn't overridden it.
Parameters:
  obj - The object The String version



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.