home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 November / Chip_1998-11_cd.bin / tema / Cafe / main.bin / ObjectOutput.java < prev    next >
Text File  |  1997-05-20  |  3KB  |  93 lines

  1. /*
  2.  * @(#)ObjectOutput.java    1.6 97/01/22
  3.  * 
  4.  * Copyright (c) 1995, 1996 Sun Microsystems, Inc. All Rights Reserved.
  5.  * 
  6.  * This software is the confidential and proprietary information of Sun
  7.  * Microsystems, Inc. ("Confidential Information").  You shall not
  8.  * disclose such Confidential Information and shall use it only in
  9.  * accordance with the terms of the license agreement you entered into
  10.  * with Sun.
  11.  * 
  12.  * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
  13.  * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  14.  * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
  15.  * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
  16.  * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
  17.  * THIS SOFTWARE OR ITS DERIVATIVES.
  18.  * 
  19.  * CopyrightVersion 1.1_beta
  20.  */
  21.  
  22. package java.io;
  23.  
  24. /**
  25.  * ObjectOutput extends the DataOutput interface to include writing of objects.
  26.  * DataOutput includes methods for output of primitive types, ObjectOutput
  27.  * extends that interface to include objects, arrays, and Strings.
  28.  *
  29.  * @author  unascribed
  30.  * @version 1.6, 01/22/97
  31.  * @see java.io.InputStream
  32.  * @see java.io.ObjectOutputStream
  33.  * @see java.io.ObjectInputStream
  34.  * @since   JDK1.1
  35.  */
  36. public interface ObjectOutput extends DataOutput {
  37.     /**
  38.      * Write an object to the underlying storage or stream.  The
  39.      * class that implements this interface defines how the object is
  40.      * written.
  41.      *
  42.      * @exception IOException Any of the usual Input/Output related exceptions.
  43.      * @since     JDK1.1
  44.      */
  45.     public void writeObject(Object obj)
  46.       throws IOException;
  47.  
  48.     /**
  49.      * Writes a byte. This method will block until the byte is actually
  50.      * written.
  51.      * @param b    the byte
  52.      * @exception IOException If an I/O error has occurred.
  53.      * @since     JDK1.1
  54.      */
  55.     public void write(int b) throws IOException;
  56.  
  57.     /**
  58.      * Writes an array of bytes. This method will block until the bytes
  59.      * are actually written.
  60.      * @param b    the data to be written
  61.      * @exception IOException If an I/O error has occurred.
  62.      * @since     JDK1.1
  63.      */
  64.     public void write(byte b[]) throws IOException;
  65.  
  66.     /**
  67.      * Writes a sub array of bytes. 
  68.      * @param b    the data to be written
  69.      * @param off    the start offset in the data
  70.      * @param len    the number of bytes that are written
  71.      * @exception IOException If an I/O error has occurred.
  72.      * @since     JDK1.1
  73.      */
  74.     public void write(byte b[], int off, int len) throws IOException;
  75.  
  76.     /**
  77.      * Flushes the stream. This will write any buffered
  78.      * output bytes.
  79.      * @exception IOException If an I/O error has occurred.
  80.      * @since     JDK1.1
  81.      */
  82.     public void flush() throws IOException;
  83.  
  84.     /**
  85.      * Closes the stream. This method must be called
  86.      * to release any resources associated with the
  87.      * stream.
  88.      * @exception IOException If an I/O error has occurred.
  89.      * @since     JDK1.1
  90.      */
  91.     public void close() throws IOException;
  92. }
  93.