home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 October / Chip_1997-10_cd.bin / tema / sybase / powerj / template.z / BaseServletStream.java next >
Text File  |  1996-12-09  |  1KB  |  55 lines

  1. /*
  2.  * BaseServletStream.java
  3.  *
  4.  *
  5.  * Copyright 1996 Sybase, Inc. All rights reserved.
  6.  */
  7.  
  8. import java.io.*;
  9.  
  10. /**
  11.  * The BaseServletStream class provides an output stream for Java 
  12.  * servlet to write to the browser client.
  13.  */
  14.  
  15.  
  16. public class BaseServletStream extends OutputStream
  17. //*************************************************
  18. {
  19.  
  20.     //-------------------------------------------------------------
  21.     // Constructor
  22.     //-------------------------------------------------------------
  23.  
  24.     /**
  25.      * Constructs a new BaseServletStream object with the specified handle
  26.      * @param handle handle to the WWW server
  27.      */
  28.      
  29.     public BaseServletStream( int handle )
  30.     //************************************
  31.     {
  32.         _handle = handle;
  33.     }
  34.     
  35.     
  36.     //-------------------------------------------------------------
  37.     // Public Methods
  38.     //-------------------------------------------------------------
  39.  
  40.     /**
  41.      * Write a single byte to the WWW server's client
  42.      * @param b byte to write
  43.      * @exception IOException If I/O error has occurred
  44.      */
  45.  
  46.     public native void write( int b ) throws IOException;
  47.     //**************************************************
  48.    
  49.     //-------------------------------------------------------------
  50.     // Data
  51.     //-------------------------------------------------------------
  52.     
  53.     private int _handle;         // handle to WebService
  54. }
  55.