org.dawb.common.util.io
Class Grep

java.lang.Object
  extended by org.dawb.common.util.io.Grep

public class Grep
extends java.lang.Object


Constructor Summary
Grep()
           
 
Method Summary
static java.util.List<java.lang.CharSequence> grep(java.io.FileInputStream fis, java.lang.String regExp, java.lang.String charsetText)
          Search for occurrences of the input pattern in the given file
static java.util.List<java.lang.CharSequence> grep(java.io.File toSearch, java.lang.String regExp, java.lang.String charsetText)
           
static java.util.List<java.lang.CharSequence> grep(org.eclipse.core.resources.IFile toSearch, java.lang.String regExp)
           
static java.util.List<java.lang.CharSequence> group(java.io.FileInputStream fis, java.lang.String regExp, java.lang.String charsetText, int group)
          Search for occurrences of the input pattern in the given file
static java.util.List<java.lang.CharSequence> group(java.io.File toSearch, java.lang.String regExp, java.lang.String charsetText, int group)
           
static java.util.List<java.lang.CharSequence> group(org.eclipse.core.resources.IFile toSearch, java.lang.String regExp, int group)
           
static java.util.List<java.lang.String> group(java.lang.String data, java.lang.String regExp, int group)
          Returns all the groups which match from the input string.
static java.util.regex.Matcher matcher(java.io.FileInputStream fis, java.lang.String regExp, java.lang.String charsetText)
          Search for occurrences of the input pattern in the given file
static java.util.regex.Matcher matcher(java.io.File toSearch, java.lang.String regExp, java.lang.String charsetText)
           
static java.util.regex.Matcher matcher(org.eclipse.core.resources.IFile toSearch, java.lang.String regExp)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Grep

public Grep()
Method Detail

grep

public static java.util.List<java.lang.CharSequence> grep(java.io.File toSearch,
                                                          java.lang.String regExp,
                                                          java.lang.String charsetText)
                                                   throws java.lang.Exception
Parameters:
toSearch -
regExp -
charsetText -
Returns:
Throws:
java.lang.Exception

grep

public static java.util.List<java.lang.CharSequence> grep(org.eclipse.core.resources.IFile toSearch,
                                                          java.lang.String regExp)
                                                   throws java.lang.Exception
Parameters:
toSearch -
regExp -
Returns:
Throws:
java.lang.Exception

grep

public static java.util.List<java.lang.CharSequence> grep(java.io.FileInputStream fis,
                                                          java.lang.String regExp,
                                                          java.lang.String charsetText)
                                                   throws java.io.IOException
Search for occurrences of the input pattern in the given file

Parameters:
toSearch -
regExp -
charsetText -
Returns:
Throws:
java.io.IOException

matcher

public static java.util.regex.Matcher matcher(java.io.File toSearch,
                                              java.lang.String regExp,
                                              java.lang.String charsetText)
                                       throws java.lang.Exception
Throws:
java.lang.Exception

matcher

public static java.util.regex.Matcher matcher(org.eclipse.core.resources.IFile toSearch,
                                              java.lang.String regExp)
                                       throws java.lang.Exception
Throws:
java.lang.Exception

matcher

public static java.util.regex.Matcher matcher(java.io.FileInputStream fis,
                                              java.lang.String regExp,
                                              java.lang.String charsetText)
                                       throws java.io.IOException
Search for occurrences of the input pattern in the given file

Parameters:
toSearch -
regExp -
charsetText -
Returns:
Throws:
java.io.IOException

group

public static java.util.List<java.lang.CharSequence> group(java.io.File toSearch,
                                                           java.lang.String regExp,
                                                           java.lang.String charsetText,
                                                           int group)
                                                    throws java.lang.Exception
Parameters:
toSearch -
regExp -
charsetText -
Returns:
Throws:
java.lang.Exception

group

public static java.util.List<java.lang.CharSequence> group(org.eclipse.core.resources.IFile toSearch,
                                                           java.lang.String regExp,
                                                           int group)
                                                    throws java.lang.Exception
Parameters:
toSearch -
regExp -
Returns:
Throws:
java.lang.Exception

group

public static java.util.List<java.lang.CharSequence> group(java.io.FileInputStream fis,
                                                           java.lang.String regExp,
                                                           java.lang.String charsetText,
                                                           int group)
                                                    throws java.io.IOException
Search for occurrences of the input pattern in the given file

Parameters:
toSearch -
regExp -
charsetText -
Returns:
Throws:
java.io.IOException

group

public static java.util.List<java.lang.String> group(java.lang.String data,
                                                     java.lang.String regExp,
                                                     int group)
Returns all the groups which match from the input string.

Parameters:
fileName -
regExp -
group -
Returns: