import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.io.UnsupportedEncodingException; /* * Created on 16.06.2004 * * To change the template for this generated file go to * Window>Preferences>Java>Code Generation>Code and Comments */ /** * @author rogo * * To change the template for this generated type comment go to * Window>Preferences>Java>Code Generation>Code and Comments */ public class CodeTest { public static void main(String[] args) { try { // OutputStreamWriter writer = new OutputStreamWriter(new FileOutputStream("test"),"ISO-8859-1"); // for(int i=0;i<256;++i) // { // writer.write((char)i); // } // writer.close(); FileOutputStream stream = new FileOutputStream("test"); for(int i=0;i<256;++i) stream.write(i); stream.close(); InputStreamReader reader = new InputStreamReader(new FileInputStream("test"),"MacCentralEurope"); char[] a = new char[256]; reader.read(a); String text= new String(a); // System.out.println(text); for(int i=0;i