0N/A/*
3261N/A * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
0N/A */
0N/A
0N/Apackage java.io;
0N/A
0N/A/**
0N/A * ObjectOutput extends the DataOutput interface to include writing of objects.
0N/A * DataOutput includes methods for output of primitive types, ObjectOutput
0N/A * extends that interface to include objects, arrays, and Strings.
0N/A *
0N/A * @author unascribed
0N/A * @see java.io.InputStream
0N/A * @see java.io.ObjectOutputStream
0N/A * @see java.io.ObjectInputStream
0N/A * @since JDK1.1
0N/A */
2574N/Apublic interface ObjectOutput extends DataOutput, AutoCloseable {
0N/A /**
0N/A * Write an object to the underlying storage or stream. The
0N/A * class that implements this interface defines how the object is
0N/A * written.
0N/A *
0N/A * @param obj the object to be written
0N/A * @exception IOException Any of the usual Input/Output related exceptions.
0N/A */
0N/A public void writeObject(Object obj)
0N/A throws IOException;
0N/A
0N/A /**
0N/A * Writes a byte. This method will block until the byte is actually
0N/A * written.
0N/A * @param b the byte
0N/A * @exception IOException If an I/O error has occurred.
0N/A */
0N/A public void write(int b) throws IOException;
0N/A
0N/A /**
0N/A * Writes an array of bytes. This method will block until the bytes
0N/A * are actually written.
0N/A * @param b the data to be written
0N/A * @exception IOException If an I/O error has occurred.
0N/A */
0N/A public void write(byte b[]) throws IOException;
0N/A
0N/A /**
0N/A * Writes a sub array of bytes.
0N/A * @param b the data to be written
0N/A * @param off the start offset in the data
0N/A * @param len the number of bytes that are written
0N/A * @exception IOException If an I/O error has occurred.
0N/A */
0N/A public void write(byte b[], int off, int len) throws IOException;
0N/A
0N/A /**
0N/A * Flushes the stream. This will write any buffered
0N/A * output bytes.
0N/A * @exception IOException If an I/O error has occurred.
0N/A */
0N/A public void flush() throws IOException;
0N/A
0N/A /**
0N/A * Closes the stream. This method must be called
0N/A * to release any resources associated with the
0N/A * stream.
0N/A * @exception IOException If an I/O error has occurred.
0N/A */
0N/A public void close() throws IOException;
0N/A}