import java.net.*;
import java.io.*;
public class webworm extends  java.applet.Applet {
   URL url;
   String pages, fileName;
   public String getsource(String fileName) throws IOException {
      String line;
      InputStream connection;
      DataInputStream dataStream;
      StringBuffer buffer = new StringBuffer();
      try {
         url = new URL(getDocumentBase(),fileName);
      }
      catch (MalformedURLException e) {
         page = "AppletError " + e;
      }
      try {
      connection = url.openStream();
      dataStream = new DataInputStream(new BufferedInputStream(connection));
         while ((line = dataStream.readLine()) != null) {
            buffer.append(line + "\n");
         }
         page = buffer.toString();
      }
      catch (IOException e) {
         page = "AppletError: " + e;
      }
      return page;
   }