| Modifier and Type | Method and Description |
|---|---|
static String |
baseClassname(String type) |
static void |
closeQuietly(Closeable shutting)
Closes the supplied
Closeable object ignoring an
IOException if it is thrown. |
static Pattern |
createPattern(String pattern)
Helper method to create a regular expression.
|
static org.apache.commons.logging.Log |
getExceptionLogger()
Accessor for shared instance of logger which should be
used to log all exceptions occurred during
FileSetCheck
work (debug() should be used). |
static String[] |
getLines(String fileName)
Deprecated.
consider using
FileText instead |
static String[] |
getLines(String fileName,
String charsetName)
Deprecated.
consider using
FileText instead |
static Pattern |
getPattern(String pattern)
This is a factory method to return an Pattern object for the specified
regular expression.
|
static Pattern |
getPattern(String pattern,
int compileFlags)
This is a factory method to return an Pattern object for the specified
regular expression and compile flags.
|
static String |
getStrippedFileName(String basedir,
String fileName)
Create a stripped down version of a filename.
|
static int |
lengthExpandedTabs(String string,
int toIdx,
int tabWidth)
Returns the length of a String prefix with tabs expanded.
|
static int |
lengthMinusTrailingWhitespace(String line)
Returns the length of a string ignoring all trailing whitespace.
|
static boolean |
whitespaceBefore(int index,
String line)
Returns whether the specified string contains only whitespace up to the
specified index.
|
public static org.apache.commons.logging.Log getExceptionLogger()
FileSetCheck
work (debug() should be used).public static boolean whitespaceBefore(int index, String line)
index - index to check up toline - the line to checkpublic static int lengthMinusTrailingWhitespace(String line)
line - the string to processpublic static int lengthExpandedTabs(String string, int toIdx, int tabWidth)
string - the input StringtoIdx - index in string (exclusive) where the calculation stopstabWidth - the distance between tab stop position.public static Pattern getPattern(String pattern) throws PatternSyntaxException
getPattern(String, int) with the
compile flags defaults to 0.pattern - the regular expression patternPatternSyntaxException - an invalid pattern was suppliedpublic static Pattern getPattern(String pattern, int compileFlags) throws PatternSyntaxException
pattern - the regular expression patterncompileFlags - the compilation flagsPatternSyntaxException - an invalid pattern was supplied@Deprecated public static String[] getLines(String fileName) throws IOException
FileText insteadfileName - the name of the file to loadIOException - error occurred@Deprecated public static String[] getLines(String fileName, String charsetName) throws IOException
FileText insteadfileName - the name of the file to loadcharsetName - the name of a supported charsetIOException - error occurredpublic static Pattern createPattern(String pattern) throws org.apache.commons.beanutils.ConversionException
pattern - the pattern to matchorg.apache.commons.beanutils.ConversionException - if unable to create Pattern object.public static String baseClassname(String type)
type - the fully qualified name. Cannot be nullpublic static String getStrippedFileName(String basedir, String fileName)
basedir - the prefix to strip off the original filenamefileName - the original filenamepublic static void closeQuietly(Closeable shutting)
Closeable object ignoring an
IOException if it is thrown. Honestly, what are you going to
do if you cannot close a file.shutting - the object to be closed.Copyright © 2001–2015. All rights reserved.