home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1997 October
/
Chip_1997-10_cd.bin
/
tema
/
sybase
/
powerj
/
samples.z
/
BaseServletStream.java
< prev
next >
Wrap
Text File
|
1996-12-09
|
2KB
|
68 lines
/*
* BaseServletStream.java
*
*
* Copyright 1996 Sybase, Inc. All rights reserved.
*/
import java.io.*;
/**
* The BaseServletStream class provides an output stream for Java
* servlet to write to the document from which it is invoked.
*/
public class BaseServletStream extends OutputStream
//*************************************************
{
//-------------------------------------------------------------
// Constructor
//-------------------------------------------------------------
/**
* Constructs a new BaseServletStream object with the
* specified document
*/
public BaseServletStream( Document document )
//*******************************************
{
this._document = document;
}
//-------------------------------------------------------------
// Public Methods
//-------------------------------------------------------------
/**
* Write a single byte to the document
* @param b byte to write
* @exception IOException If the document is invalid
*/
public native void write( int b ) throws IOException;
//**************************************************
/**
* Write an array of bytes to the document
* @param b[] array of bytes to be written
* @param off start offset in the data array
* @param len number of byte written
* @exception IOException If I/O error has occurred
*/
public native void writeBytes(byte b[], int off, int len) throws IOException;
//**************************************************************************
//-------------------------------------------------------------
// Data
//-------------------------------------------------------------
private Document _document; // document object where stream outputs to
}