|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgoldengate.common.utility.GgStringUtils
public class GgStringUtils
Various utilities for reading files, transforming dates, ...
Field Summary | |
---|---|
static Charset |
UTF8
Format used for Files |
Constructor Summary | |
---|---|
GgStringUtils()
|
Method Summary | |
---|---|
static String |
fillString(char fillChar,
int count)
Build a String with count chars using fillChar |
static Timestamp |
fixDate(String date)
Get a date in String and return the corresponding Timestamp |
static Timestamp |
fixDate(String date,
Timestamp before)
From a date in String format and a Timestamp, return the Timestamp as : if before = null as date if before ! |
static boolean |
getBoolean(org.dom4j.Node node)
Read a boolean value (0,1,true,false) from a node |
static int |
getInteger(org.dom4j.Node node)
Read an integer value from a node |
static String |
readFile(String filename)
Read file and return "" if an error occurs |
static String |
readFileException(String filename)
Read a file and return its content in String format |
static boolean |
replace(StringBuilder builder,
String find,
String replace)
Make a replacement of first "find" string by "replace" string into the StringBuilder |
static void |
replaceAll(StringBuilder builder,
String find,
String replace)
Make replacement of all "find" string by "replace" string into the StringBuilder |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Charset UTF8
Constructor Detail |
---|
public GgStringUtils()
Method Detail |
---|
public static String readFileException(String filename) throws InvalidArgumentException, FileTransferException
filename
-
InvalidArgumentException
- for File not found
FileTransferException
- for reading exceptionpublic static String readFile(String filename)
filename
-
public static Timestamp fixDate(String date)
date
-
public static Timestamp fixDate(String date, Timestamp before)
date
- before
-
public static boolean getBoolean(org.dom4j.Node node)
node
-
public static int getInteger(org.dom4j.Node node) throws InvalidArgumentException
node
-
InvalidArgumentException
public static boolean replace(StringBuilder builder, String find, String replace)
builder
- find
- replace
- public static void replaceAll(StringBuilder builder, String find, String replace)
builder
- find
- replace
- public static String fillString(char fillChar, int count)
fillChar
- count
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |