Java Doc for StringUtils.java in  » Profiler » JMeasurement » de » mcs » utils » 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 » Profiler » JMeasurement » de.mcs.utils 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   de.mcs.utils.StringUtils

StringUtils
final public class StringUtils (Code)
This class provides static util methods for String manaipulation that aren't part of the default JDK functionalities.
author:
   w.klaas




Method Summary
public static  StringarrayToCSVString(String[] array)
     convinient methode for converting.
public static  StringarrayToCSVString(String[] array, char localseparators, char localdelimiter)
     Takes an array of tokens and converts into separator-separated string.
Parameters:
  array - The array of strings input.
Parameters:
  localseparators - The separator char.
Parameters:
  localdelimiter - The delimiter char.
public static  StringbyteArrayToMimeString(byte[] array)
     Convert byte array to a mime coded string.
public static  String[]csvStringToArray(String string)
     Converts a delimited string into an array of string tokens.
public static  String[]csvStringToArray(String str, char localseparators, char localdelimiter)
     Converts a delimited string into an array of string tokens.
Parameters:
  str - The 'separator' separated string.
Parameters:
  localseparators - The separator char.
Parameters:
  localdelimiter - The delimiter char.
public static  StringformatFieldData(String aValue, int size)
     Getting the value formatted to the actual fieldsize.
public static  intisInArray(String[] fieldProps, String strSearchValue)
     Check strSearchValue is in Array.
public static  Stringmd5String(String s)
     building the md5 hash of an String.
public static  byte[]md5StringBytes(String s)
     Method md5String.
public static  byte[]mimeStringTobyteArray(String string)
     Convert a mimecoded string to a array of byte.
public static  StringremoveChars(String data, String removeChars)
     Remove a given set of characters from a String.
Parameters:
  data - The input string to be cleansed of 'removeChars'.
Parameters:
  removeChars - The characters to be removed.
public static  StringBufferreplaceAll(StringBuffer buffer, String find, String replacement)
     Replaces all the occurences of a substring found within a StringBuffer by a replacement string.
public static  StringreplaceVars(String origString, Map vars)
     Performs variable substitution for a string.
public static  StringstripExtension(String filename)
     Given a filename, strips the .extension.
public static  List<String>toList(String[] strings)
     converts a string array into a list of strings.
public static  byte[]xorArrays(byte[] arg0, byte[] arg1)
     xorArrays.



Method Detail
arrayToCSVString
public static String arrayToCSVString(String[] array)(Code)
convinient methode for converting. seperator will be ',' delimiter will be '"'.
Parameters:
  array - The array of strings input. String A string containing tokens separated by seperator.



arrayToCSVString
public static String arrayToCSVString(String[] array, char localseparators, char localdelimiter)(Code)
Takes an array of tokens and converts into separator-separated string.
Parameters:
  array - The array of strings input.
Parameters:
  localseparators - The separator char.
Parameters:
  localdelimiter - The delimiter char. String A string containing tokens separated by seperator.



byteArrayToMimeString
public static String byteArrayToMimeString(byte[] array) throws IOException(Code)
Convert byte array to a mime coded string.
Parameters:
  array - the array to convert mime coded String
throws:
  IOException - if something goes wrong



csvStringToArray
public static String[] csvStringToArray(String string)(Code)
Converts a delimited string into an array of string tokens. Separator is ',', delimiter is '"'
Parameters:
  string - The 'separator' separated string. String[] A string array of the original tokens.



csvStringToArray
public static String[] csvStringToArray(String str, char localseparators, char localdelimiter)(Code)
Converts a delimited string into an array of string tokens.
Parameters:
  str - The 'separator' separated string.
Parameters:
  localseparators - The separator char.
Parameters:
  localdelimiter - The delimiter char. String[] A string array of the original tokens.



formatFieldData
public static String formatFieldData(String aValue, int size)(Code)
Getting the value formatted to the actual fieldsize.
Parameters:
  aValue - value to format
Parameters:
  size - array index of this field String



isInArray
public static int isInArray(String[] fieldProps, String strSearchValue)(Code)
Check strSearchValue is in Array.
Parameters:
  fieldProps - Array
Parameters:
  strSearchValue - SearchString integer Value of Index in Array



md5String
public static String md5String(String s)(Code)
building the md5 hash of an String.
Parameters:
  s - String String



md5StringBytes
public static byte[] md5StringBytes(String s)(Code)
Method md5String.
Parameters:
  s - String byte[[]



mimeStringTobyteArray
public static byte[] mimeStringTobyteArray(String string) throws Exception(Code)
Convert a mimecoded string to a array of byte.
Parameters:
  string - the mime coded string an array of byte
throws:
  Exception - if something goes wrong



removeChars
public static String removeChars(String data, String removeChars)(Code)
Remove a given set of characters from a String.
Parameters:
  data - The input string to be cleansed of 'removeChars'.
Parameters:
  removeChars - The characters to be removed. String The new string cleansed of 'removeChars'.



replaceAll
public static StringBuffer replaceAll(StringBuffer buffer, String find, String replacement)(Code)
Replaces all the occurences of a substring found within a StringBuffer by a replacement string.
Parameters:
  buffer - the StringBuffer in where the replace will take place
Parameters:
  find - the substring to find and replace
Parameters:
  replacement - the replacement string for all occurences of find the original StringBuffer where all the occurences of find arereplaced by replacement



replaceVars
public static String replaceVars(String origString, Map vars)(Code)
Performs variable substitution for a string. String is scanned for ${variable_name} and if one is found, it is replaced with corresponding value from the vars hashtable.
Parameters:
  origString - unmodified string
Parameters:
  vars - Hashtable of replacement values modified string
exception:
  Exception -



stripExtension
public static String stripExtension(String filename)(Code)
Given a filename, strips the .extension.
Parameters:
  filename - filename to strip String filename without .extension



toList
public static List<String> toList(String[] strings)(Code)
converts a string array into a list of strings.
Parameters:
  strings - string array to convert to a list.



xorArrays
public static byte[] xorArrays(byte[] arg0, byte[] arg1)(Code)
xorArrays.
Parameters:
  arg0 - byte[]
Parameters:
  arg1 - byte[] byte[]



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.