home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 November / CHIP_CD_1998_11_PL.iso / offline / internet / asp / asp2html / IISASP2HTM1.EXE / Source / test.java < prev   
Encoding:
Java Source  |  1997-07-15  |  1.2 KB  |  62 lines

  1. package IISSample;
  2.  
  3. import java.io.*;
  4. //
  5. //
  6. // Test
  7. //
  8. //
  9.  
  10. class Test 
  11. {
  12.     public static void main(String args[])
  13.     {
  14.         try
  15.         {
  16.             Asp2Htm nwTest = new Asp2Htm();
  17.  
  18.             nwTest.URL("http://joseg2");
  19.             nwTest.GetData();
  20.             nwTest.WriteToFile("f:/inetpub/wwwroot/temp.html");
  21.  
  22.             if (true) {
  23.                 System.out.println(nwTest.File());
  24.                 System.out.println(nwTest.Host());
  25.                 System.out.println(nwTest.Port());
  26.                 System.out.println(nwTest.Protocol());
  27.                 System.out.println(nwTest.ContentEncoding());
  28.     //            System.out.println(nwTest.ContentLength());
  29.                 System.out.println(nwTest.ContentType());
  30.                 System.out.println(nwTest.Date());
  31.                 System.out.println(nwTest.Expiration());
  32.                 System.out.println(nwTest.LastModified());
  33.                 System.out.println(nwTest.Server());
  34.             }
  35.             if (false) {
  36.                 String stbody = nwTest.Body();
  37.                 System.out.println(stbody);
  38.                 System.out.println(stbody.length());
  39.                 System.out.println("That's All");
  40.             }
  41.  
  42.         
  43.             System.out.println("Title = " + nwTest.Title());
  44.             System.out.println("\n\nBody = " + nwTest.Body());
  45.  
  46.             try
  47.             {
  48.                 System.in.read();
  49.             }
  50.             catch (IOException e)
  51.             {
  52.                 // ignore
  53.             }
  54.         }
  55.         catch( Throwable t )
  56.         {
  57.             t.printStackTrace();
  58.         }
  59.     }
  60. }
  61.  
  62.