src/share/classes/java/io/ObjectOutput.java

Print this page
rev 10048 : 8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
Reviewed-by:


  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package java.io;
  27 
  28 /**
  29  * ObjectOutput extends the DataOutput interface to include writing of objects.
  30  * DataOutput includes methods for output of primitive types, ObjectOutput
  31  * extends that interface to include objects, arrays, and Strings.
  32  *
  33  * @author  unascribed
  34  * @see java.io.InputStream
  35  * @see java.io.ObjectOutputStream
  36  * @see java.io.ObjectInputStream
  37  * @since   JDK1.1
  38  */
  39 public interface ObjectOutput extends DataOutput, AutoCloseable {
  40     /**
  41      * Write an object to the underlying storage or stream.  The
  42      * class that implements this interface defines how the object is
  43      * written.
  44      *
  45      * @param obj the object to be written
  46      * @exception IOException Any of the usual Input/Output related exceptions.
  47      */
  48     public void writeObject(Object obj)
  49       throws IOException;
  50 
  51     /**
  52      * Writes a byte. This method will block until the byte is actually
  53      * written.
  54      * @param b the byte
  55      * @exception IOException If an I/O error has occurred.
  56      */
  57     public void write(int b) throws IOException;




  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package java.io;
  27 
  28 /**
  29  * ObjectOutput extends the DataOutput interface to include writing of objects.
  30  * DataOutput includes methods for output of primitive types, ObjectOutput
  31  * extends that interface to include objects, arrays, and Strings.
  32  *
  33  * @author  unascribed
  34  * @see java.io.InputStream
  35  * @see java.io.ObjectOutputStream
  36  * @see java.io.ObjectInputStream
  37  * @since   1.1
  38  */
  39 public interface ObjectOutput extends DataOutput, AutoCloseable {
  40     /**
  41      * Write an object to the underlying storage or stream.  The
  42      * class that implements this interface defines how the object is
  43      * written.
  44      *
  45      * @param obj the object to be written
  46      * @exception IOException Any of the usual Input/Output related exceptions.
  47      */
  48     public void writeObject(Object obj)
  49       throws IOException;
  50 
  51     /**
  52      * Writes a byte. This method will block until the byte is actually
  53      * written.
  54      * @param b the byte
  55      * @exception IOException If an I/O error has occurred.
  56      */
  57     public void write(int b) throws IOException;