public void inserts(String extFile,String origFileName,String tag) throws IOException {
  String content=getMatched(extFile);
  if (content.length() > 0) {
    content+="\n" + tag;
    String orig=getFileContent(origFileName);
    orig=StringUtils.strReplaceAll(orig,tag,content);
    writeToFile(origFileName,orig);
  }
}

public void inserts ( String extFile , String origFileName , String tag ) throws IOException { String content = getMatched ( extFile ) ; if ( content . length ( ) > 0 ) { content += "\n" + tag ; String orig = getFileContent ( origFileName ) ; orig = StringUtils . strReplaceAll ( orig , tag , content ) ; writeToFile ( origFileName , orig ) ; } }
inserts a portion of one file and insert into another file .
