Package org.compiere.tools
Class Strip
- java.lang.Object
-
- org.compiere.tools.Strip
-
public class Strip extends Object
Strip Windows (cr/lf) Text files to Unix (cr) Text files- Version:
- $Id: Strip.java,v 1.2 2006/07/30 00:51:06 jjanke Exp $
- Author:
- Jorg Janke
-
-
Constructor Summary
Constructors Constructor Description Strip()
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
main(String[] args)
Strip file in argsboolean
strip(File infile, File outfile)
Strip infile to outfileboolean
strip(String infile, String outfile)
Strip infile to outfilevoid
stripDirectory(String directory, String nameMustContain)
Strip a directory (and its subdirectories recursively)
-
-
-
Method Detail
-
stripDirectory
public void stripDirectory(String directory, String nameMustContain)
Strip a directory (and its subdirectories recursively)- Parameters:
directory
- directorynameMustContain
- file name must include characters - e.g. .sh (do not include wildcards like *). If null, all files are stripped
-
strip
public boolean strip(String infile, String outfile)
Strip infile to outfile- Parameters:
infile
- input fileoutfile
- (can be null)- Returns:
- true if copied
-
strip
public boolean strip(File infile, File outfile)
Strip infile to outfile- Parameters:
infile
- input fileoutfile
- if the output file is null, the infile is renamed to ".bak"- Returns:
- true if copied
-
main
public static void main(String[] args)
Strip file in args- Parameters:
args
- infile outfile
-
-