[Home] [Kuri] [Sysad] [Internet?] [Blog] [Java] [Windows] [Download] [Profile] [Flash] [+] |
import java.io.*; public class enctrans { public static void main(String a[]) throws UnsupportedEncodingException, IOException { if(a.length != 3) { System.err.println("Usage: java enctrans file in_code out_code"); System.exit(1); } InputStreamReader in = new InputStreamReader( new BufferedInputStream(new FileInputStream(a[0])), a[1]); OutputStreamWriter out = new OutputStreamWriter( new BufferedOutputStream(System.out), a[2]); int c; while(true) { if((c = in.read()) < 0) break; out.write(c); } in.close(); out.flush(); out.close(); } } |
[Home] [Kuri] [Sysad] [Internet?] [Blog] [Java] [Windows] [Download] [Profile] [Flash] [-] | |
usu@usupi.org | Last modified : Wed Jun 6 14:34:17 2001 |