it.haefelinger.flaka
Class IsText
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.types.DataType
org.apache.tools.ant.types.selectors.BaseSelector
it.haefelinger.flaka.IsText
- All Implemented Interfaces:
- Cloneable, FileSelector
public class IsText
- extends BaseSelector
- Since:
- 1.0
- Author:
- merzedes
|
Field Summary |
protected boolean |
invert
invert selection |
protected long |
limit
upper limit of characters to investige. |
| Methods inherited from class org.apache.tools.ant.types.DataType |
checkAttributesAllowed, checkChildrenAllowed, circularReference, clone, dieOnCircularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, setChecked, setRefid, tooManyAttributes, toString |
limit
protected long limit
- upper limit of characters to investige.
invert
protected boolean invert
- invert selection
IsText
public IsText()
setLimit
public void setLimit(long n)
- set limit
setInvertMatch
public void setInvertMatch(boolean b)
setInvert
public void setInvert(boolean b)
isSelected
public boolean isSelected(File basedir,
String filename,
File file)
- * Implements a selector to restrict a given fileset to contain * "textual"
files only. * *
- Specified by:
isSelected in interface FileSelector- Specified by:
isSelected in class BaseSelector
istext
protected boolean istext(InputStream S,
long max)
throws Exception
- Throws:
Exception
isbinary
protected boolean isbinary(InputStream S,
long max)
throws Exception
- Throws:
Exception
open
protected InputStream open(File file)
close
protected boolean close(InputStream S)
debug
protected void debug(String msg)
debug
protected void debug(String msg,
Exception e)