home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 9 / IOPROG_9.ISO / contrib / iis4 / iis4_07.cab / UseTableStream.java < prev    next >
Encoding:
Java Source  |  1997-09-05  |  745 b   |  34 lines

  1. /**
  2.  * UseTableStream: Hook up the HTMLTableStream object to the Framework's Response
  3.  * object, which is an OutputStream.
  4.  */
  5.  
  6. package IISSample;
  7.  
  8. import java.io.*;
  9. import aspcomp.*;
  10.  
  11.  
  12. public class UseTableStream 
  13. {
  14.  
  15.     public void makeTable()
  16.     {
  17.         Response response = AspContext.getResponse();
  18.  
  19.         // Consider: change to not use StringBufferInputStream
  20.         StringBufferInputStream bufStream = new 
  21.             StringBufferInputStream("1 2 3 4 \n 5 6 7 8 \n 9 10 11 12 \n");
  22.  
  23.         HTMLTableStream ts = new HTMLTableStream(bufStream);
  24.  
  25.         ts.setCols(4);
  26.         ts.setBorderWidth(2);
  27.         ts.setCellSpacing(3);
  28.         ts.setBorderColor("Green");
  29.  
  30.         ts.OutputTable(response);
  31.     }
  32.  
  33. }
  34.