import java.net.*;
import java.io.*;
public class CryptExample {
public static void main( String argv[] ) throws Exception {
URL url = new URL("crypt:rot13://flatland/~pat/foo.txt");
BufferedReader bin = new BufferedReader (
new InputStreamReader( url.openStream(), "8859_1" ) );
String line;
while ( (line = bin.readLine()) != null )
System.out.println( line );
}
}
|