M
M
I got a program in which i write a vrml file, i thus need it encoded into
utf8, but i don't know how to do it?
Thanks for your help.
M.
File sortie = new File(".../b.vrml");
sortie.createNewFile();
OutputStreamWriter out = new OutputStreamWriter(new
FileOutputStream(sortie), "UTF8");
out.write("#VRML V2.0 utf8# \n # PROGRAMME test.\n # ===============\n#"
+ "\n# \nNavigationInfo {type \"EXAMINE\"}\nShape
{\nappearance Appearance"
+ "{ material Material {}}\ngeometry PointSet {\ncoord Coordinate
{\npoint [\n");
for (int v = 0; v<equationsDroites.size(); v++){
param[] t = (param[])equationsDroites.get(v);
double[] tt = {1,1,1,1};
double[] tp = calculPointIntersection(t, tt);
if (tp != null)
nbPointsInter ++;
System.out.println("Point intersection " + nbPointsInter);
for (int k = 0; k<tp.length; k++)
out.write(tp[k] + " ");
out.write("\n");
//maChaine = maChaine + "\n";
System.out.println("\n");
out.write("\n]\n}}}\n\n");
out.close();
utf8, but i don't know how to do it?
Thanks for your help.
M.
File sortie = new File(".../b.vrml");
sortie.createNewFile();
OutputStreamWriter out = new OutputStreamWriter(new
FileOutputStream(sortie), "UTF8");
out.write("#VRML V2.0 utf8# \n # PROGRAMME test.\n # ===============\n#"
+ "\n# \nNavigationInfo {type \"EXAMINE\"}\nShape
{\nappearance Appearance"
+ "{ material Material {}}\ngeometry PointSet {\ncoord Coordinate
{\npoint [\n");
for (int v = 0; v<equationsDroites.size(); v++){
param[] t = (param[])equationsDroites.get(v);
double[] tt = {1,1,1,1};
double[] tp = calculPointIntersection(t, tt);
if (tp != null)
nbPointsInter ++;
System.out.println("Point intersection " + nbPointsInter);
for (int k = 0; k<tp.length; k++)
out.write(tp[k] + " ");
out.write("\n");
//maChaine = maChaine + "\n";
System.out.println("\n");
out.write("\n]\n}}}\n\n");
out.close();