Bom dia estou com o seguinte problema, o meu código precisa converter os TABS em espaço, mas ele não está eliminando. Agradeço qualquer ajuda.
Segue o o código.
private void buttonGerarArquivoMouseClicked(java.awt.event.MouseEvent evt) {
String texto = "";
String strCodigo = "";
String strData = "";
String strHora = "";
String strDocumento = "";
String documento = "";
int cont = 0;
int cont2 = 0;
try{
BufferedReader input = new BufferedReader(new FileReader("C:\\Gerador\\HORA300.txt"));
try{
String linha = null;
FileWriter arquivo;
PrintWriter escrever;
arquivo = new FileWriter("C:\\Gerador\\HORASAF.txt");
escrever = new PrintWriter(arquivo);
texto = linha = input.readLine();
while (linha != null){
texto.replaceAll("\t"," ");
while (texto.charAt(cont) != ' '){
strCodigo += texto.charAt(cont);
linha = input.readLine();
cont ++;
}
}
escrever.append(strCodigo);
escrever.close();
this.dispose();
}catch(java.io.IOException ioex){
}finally{
input.close();
}
}catch (IOException ioe){
}
}