Package org.dawb.common.util.io
Class Grep
java.lang.Object
org.dawb.common.util.io.Grep
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List<CharSequence> grep(FileInputStream fis, String regExp, String charsetText) Search for occurrences of the input pattern in the given filestatic List<CharSequence> static List<CharSequence> static List<CharSequence> static List<CharSequence> group(FileInputStream fis, String regExp, String charsetText, int group) Search for occurrences of the input pattern in the given filestatic List<CharSequence> Returns all the groups which match from the input string.static List<CharSequence> static Matchermatcher(FileInputStream fis, String regExp, String charsetText) Search for occurrences of the input pattern in the given filestatic Matcherstatic Matcher
-
Constructor Details
-
Grep
public Grep()
-
-
Method Details
-
grep
- Parameters:
toSearch-regExp-charsetText-- Returns:
- Throws:
Exception
-
grep
public static List<CharSequence> grep(File toSearch, String regExp, String charsetText) throws Exception - Parameters:
toSearch-regExp-charsetText-- Returns:
- Throws:
Exception
-
grep
public static List<CharSequence> grep(org.eclipse.core.resources.IFile toSearch, String regExp) throws Exception - Parameters:
toSearch-regExp-- Returns:
- Throws:
Exception
-
grep
public static List<CharSequence> grep(FileInputStream fis, String regExp, String charsetText) throws IOException Search for occurrences of the input pattern in the given file- Parameters:
regExp-charsetText-toSearch-- Returns:
- Throws:
IOException
-
matcher
- Throws:
Exception
-
matcher
public static Matcher matcher(org.eclipse.core.resources.IFile toSearch, String regExp) throws Exception - Throws:
Exception
-
matcher
public static Matcher matcher(FileInputStream fis, String regExp, String charsetText) throws IOException Search for occurrences of the input pattern in the given file- Parameters:
regExp-charsetText-toSearch-- Returns:
- Throws:
IOException
-
group
public static List<CharSequence> group(File toSearch, String regExp, String charsetText, int group) throws Exception - Parameters:
toSearch-regExp-charsetText-- Returns:
- Throws:
Exception
-
group
public static List<CharSequence> group(org.eclipse.core.resources.IFile toSearch, String regExp, int group) throws Exception - Parameters:
toSearch-regExp-- Returns:
- Throws:
Exception
-
group
public static List<CharSequence> group(FileInputStream fis, String regExp, String charsetText, int group) throws IOException Search for occurrences of the input pattern in the given file- Parameters:
regExp-charsetText-toSearch-- Returns:
- Throws:
IOException
-
group
Returns all the groups which match from the input string.- Parameters:
regExp-group-fileName-- Returns:
-