org.webdocwf.util.xml
Class Utils

java.lang.Object
  extended byorg.webdocwf.util.xml.Utils

public class Utils
extends java.lang.Object

Utility methods for xml jdbc.

Author:
Zoran Milakovic

Field Summary
static java.lang.String keywordEscape
           
static java.lang.String[] keywords
           
 
Constructor Summary
Utils()
           
 
Method Summary
static java.lang.String bytesToHexString(byte[] b)
          This method transform binary object to string object
static java.lang.String handleBinaryString(java.lang.String binaryString, java.util.List binaryStreamObjectList)
           
static java.lang.String handleQuotedString(java.lang.String quotedString)
           
static byte[] hexStringToBytes(java.lang.String val)
          This method transform string object to binary object (array of bytes)
static java.lang.String replaceAll(java.lang.String input, java.lang.String forReplace, java.lang.String replaceWith)
          Replace all occurence of forReplace with replaceWith in input string.
static java.lang.String replaceKeywords(java.lang.String s, java.util.HashMap oldValues)
          Method replace all keywords in string passed as parameter.
static java.lang.String replaceKeywordsBack(java.lang.String s, java.util.HashMap oldValues)
          Method replace all keywords in string passed as parameter.
static java.lang.String streamToHexString(java.io.InputStream is)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

keywords

public static final java.lang.String[] keywords

keywordEscape

public static final java.lang.String keywordEscape
See Also:
Constant Field Values
Constructor Detail

Utils

public Utils()
Method Detail

handleBinaryString

public static java.lang.String handleBinaryString(java.lang.String binaryString,
                                                  java.util.List binaryStreamObjectList)

handleQuotedString

public static java.lang.String handleQuotedString(java.lang.String quotedString)

replaceAll

public static java.lang.String replaceAll(java.lang.String input,
                                          java.lang.String forReplace,
                                          java.lang.String replaceWith)
Replace all occurence of forReplace with replaceWith in input string.


bytesToHexString

public static java.lang.String bytesToHexString(byte[] b)
This method transform binary object to string object

Parameters:
b - is array of bytes which represents binary object
Returns:
string representation of binary object

hexStringToBytes

public static byte[] hexStringToBytes(java.lang.String val)
This method transform string object to binary object (array of bytes)

Parameters:
val - is string representation of binary object
Returns:
binary object

streamToHexString

public static java.lang.String streamToHexString(java.io.InputStream is)
                                          throws java.io.IOException
Parameters:
is -
Returns:
String that represent InputStream is.
Throws:
java.io.IOException

replaceKeywords

public static java.lang.String replaceKeywords(java.lang.String s,
                                               java.util.HashMap oldValues)
Method replace all keywords in string passed as parameter.

Parameters:
s - String within replace should be done.
Returns:
String with special character array instead of keywords.

replaceKeywordsBack

public static java.lang.String replaceKeywordsBack(java.lang.String s,
                                                   java.util.HashMap oldValues)
Method replace all keywords in string passed as parameter.

Parameters:
s - String within replace should be done.
Returns:
String with special character array instead of keywords.


Copyright © 2002-2007 Together - the Workgroup. All Rights Reserved.