Pulo de linha indesejado no txt

Estou tendo um pequeno problema: quando escrevo numeros em um txt, ele muda de linha, entre um numero e outro… quero montar todos de forma que fiquem em apenas uma linha, separados por espaços somente, para posterior consultas… é dificil? :roll:

Dado

public void insereLinha(int v)
{
try
{
bwriter.write(new Integer(v).toString());
//bwriter.newLine();
bwriter.flush();
}
catch (IOException e)
{
e.printStackTrace();
}
}

eu fiz isso e funcionou

public void grava_tudo(String texto)
{
try
{
File gravacao = new File(“codigos.txt”);
FileWriter writer = new FileWriter(gravacao,true); PrintWriter saida = new PrintWriter(writer);
saida.println(texto); //aqui ira quebrar linha
ou vc usa
saida.print(texto); /aqui ficara tudo na mesma linha
saida.close();
writer.close(); }
catch(Exception e)
{
System.out.println("Erro ao abrir: " + e); }
System.out.println(“DADOS SALVOS COM SUCESSO”);
}

int[] a = {1,2,3]
BufferedWriter bw = new BufferedWriter(new FileWriter(“meu_arquivo.txt”));
StringBuffer sb =new StringBuffer("");
for (int k ; k< a.lenght();k++)
{
sb.append(Integer.toString(a[k]);
}
bw.write(sb.toString());
bw.flush();