Buenos dias
Sigue sin funcionar. Este es el codigo de prueba, y en la salida no hay mas que esto: ¬í (tamaño 4 bytes)
Tambien he probado escribiendo caracter a caracter, pero solo funciona con textos pequeños (como el del ejemplo), pero con textos largos (como el que me ocupa) me inserta periodicamente dos letras : wÿ.
Por cierto, ¿como le paso el filtro al filedialog sn usar swing?
Muchas Gracias
public static void main(String[] args) {
try
{
FileDialog fd=new FileDialog(new Frame(), "Seleccione archivo", fd.SAVE);
fd.setDirectory("C:\\excel");
fd.setFile("*.xls");
String path=fd.getDirectory() + "\\" + fd.getFile();
if(fd.getFile()!=null ||fd.getFile()!="")
{
FileOutputStream f=new FileOutputStream (path);
ObjectOutputStream s=new ObjectOutputStream (f);
String textoFinal=new String("<html><head></head><body>sábado esdrújulo </body></html>");
System.out.println("textoFinal: " + textoFinal);
s.writeUTF(textoFinal);
f.close();
fd.show();
}
System.exit(0);
}
catch(IOException ex)
{
System.out.println("excepcion i/o");
System.out.println(ex.getMessage());
ex.printStackTrace();
}
catch(Exception ex)
{
System.out.println("excepcion");
System.out.println(ex.getM