it.haefelinger.flaka
Class IsText

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.types.DataType
          extended by org.apache.tools.ant.types.selectors.BaseSelector
              extended by 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.
 
Fields inherited from class org.apache.tools.ant.types.DataType
checked, ref
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
IsText()
           
 
Method Summary
protected  boolean close(InputStream S)
           
protected  void debug(String msg)
           
protected  void debug(String msg, Exception e)
           
protected  boolean isbinary(InputStream S, long max)
           
 boolean isSelected(File basedir, String filename, File file)
          * Implements a selector to restrict a given fileset to contain * "textual" files only.
protected  boolean istext(InputStream S, long max)
           
protected  InputStream open(File file)
           
 void setInvert(boolean b)
           
 void setInvertMatch(boolean b)
           
 void setLimit(long n)
          set limit
 
Methods inherited from class org.apache.tools.ant.types.selectors.BaseSelector
getError, setError, validate, verifySettings
 
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
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

limit

protected long limit
upper limit of characters to investige.


invert

protected boolean invert
invert selection

Constructor Detail

IsText

public IsText()
Method Detail

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)