org.activemath.util
Class LineStripper

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.activemath.util.LineStripper

public class LineStripper
extends org.apache.tools.ant.Task

A simple utility to strip the lines containing a substring. The attributes are:

The input is read using any line-ending mechanism (as provided by java's java.io.LineNumberReader) and output using the system-dependent line-ending mechanism.

Version:

Field Summary
protected  boolean atLineStart
           
protected  String commentSign
           
protected  File destination
           
protected  String encoding
           
protected  boolean force
           
protected  String lineContent
           
protected static String newLine
           
protected  File source
           
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
LineStripper()
           
 
Method Summary
protected  boolean checkIsNeeded()
           
 void execute()
           
 void setAtLineStart(boolean lineStart)
           
 void setDestination(File file)
           
 void setEncoding(String encoding)
           
 void setForce(boolean force)
           
 void setLineContent(String lineContent)
           
 void setSource(File file)
           
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

source

protected File source

destination

protected File destination

encoding

protected String encoding

lineContent

protected String lineContent

commentSign

protected String commentSign

atLineStart

protected boolean atLineStart

force

protected boolean force

newLine

protected static final String newLine
Constructor Detail

LineStripper

public LineStripper()
Method Detail

setSource

public void setSource(File file)

setDestination

public void setDestination(File file)

setEncoding

public void setEncoding(String encoding)

setLineContent

public void setLineContent(String lineContent)

setAtLineStart

public void setAtLineStart(boolean lineStart)

setForce

public void setForce(boolean force)

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Overrides:
execute in class org.apache.tools.ant.Task
Throws:
org.apache.tools.ant.BuildException

checkIsNeeded

protected boolean checkIsNeeded()
                         throws IOException
Throws:
IOException