thelordoftherings
Programmer
Hello,
I need to create an HTML in Java.
In order to do that I create an html file and write the data there using Dataoutputstrem. I am using the writeUTF method since I write hebrew chars. The problem is that every sentence I write ends with a random character which wasn't exist at the original text, it could be ( $ [ ect...
Here is a piece of my code:
FileOutputStream outFile = new FileOutputStream(new File("C:\\Inetpub\\DataOutputStream outData = new DataOutputStream(outFile);
outData.writeBytes("<HTML><HEAD><TITLE> ?? ???????? </TITLE></HEAD><BODY>");
outData.writeBytes("<H1><CENTER>");
outData.writeUTF(" ???? " );
outData.writeBytes("</CENTER></H1><HR><BR><BR>");
outData.writeBytes("<H3>");
outData.writeBytes("<P align=right>");
utData.writeUTF("??? ?????" + "<BR><BR>");
outData.writeBytes("</P></H3><BR>");
outData.writeBytes("</BODY></HTML>");
outData.close();
outFile.close();
I need to create an HTML in Java.
In order to do that I create an html file and write the data there using Dataoutputstrem. I am using the writeUTF method since I write hebrew chars. The problem is that every sentence I write ends with a random character which wasn't exist at the original text, it could be ( $ [ ect...
Here is a piece of my code:
FileOutputStream outFile = new FileOutputStream(new File("C:\\Inetpub\\DataOutputStream outData = new DataOutputStream(outFile);
outData.writeBytes("<HTML><HEAD><TITLE> ?? ???????? </TITLE></HEAD><BODY>");
outData.writeBytes("<H1><CENTER>");
outData.writeUTF(" ???? " );
outData.writeBytes("</CENTER></H1><HR><BR><BR>");
outData.writeBytes("<H3>");
outData.writeBytes("<P align=right>");
utData.writeUTF("??? ?????" + "<BR><BR>");
outData.writeBytes("</P></H3><BR>");
outData.writeBytes("</BODY></HTML>");
outData.close();
outFile.close();