< prev index next >

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

Print this page




  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;
  58 
  59     /**
  60      * Writes an array of bytes. This method will block until the bytes
  61      * are actually written.
  62      * @param b the data to be written
  63      * @exception IOException If an I/O error has occurred.
  64      */
  65     public void write(byte b[]) throws IOException;
  66 
  67     /**
  68      * Writes a sub array of bytes.
  69      * @param b the data to be written
  70      * @param off       the start offset in the data
  71      * @param len       the number of bytes that are written
  72      * @exception IOException If an I/O error has occurred.
  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      */
  81     public void flush() throws IOException;
  82 
  83     /**
  84      * Closes the stream. This method must be called
  85      * to release any resources associated with the
  86      * stream.
  87      * @exception IOException If an I/O error has occurred.
  88      */
  89     public void close() throws IOException;
  90 }


  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;
  58 
  59     /**
  60      * Writes an array of bytes. This method will block until the bytes
  61      * are actually written.
  62      * @param b the data to be written
  63      * @exception IOException If an I/O error has occurred.
  64      */
  65     public void write(byte[] b) throws IOException;
  66 
  67     /**
  68      * Writes a sub array of bytes.
  69      * @param b the data to be written
  70      * @param off       the start offset in the data
  71      * @param len       the number of bytes that are written
  72      * @exception IOException If an I/O error has occurred.
  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      */
  81     public void flush() throws IOException;
  82 
  83     /**
  84      * Closes the stream. This method must be called
  85      * to release any resources associated with the
  86      * stream.
  87      * @exception IOException If an I/O error has occurred.
  88      */
  89     public void close() throws IOException;
  90 }
< prev index next >