< prev index next >

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

Print this page
rev 56290 : 8230648: Replace @exception tag with @throws in java.base
Summary: Minor coding style update of javadoc tag in any file in java.base
Reviewed-by: prappo, lancea

@@ -79,11 +79,11 @@
      * <code>1</code>.
      * <p>
      * Implements the <code>write</code> method of <code>OutputStream</code>.
      *
      * @param      b   the <code>byte</code> to be written.
-     * @exception  IOException  if an I/O error occurs.
+     * @throws     IOException  if an I/O error occurs.
      * @see        java.io.FilterOutputStream#out
      */
     public synchronized void write(int b) throws IOException {
         out.write(b);
         incCount(1);

@@ -96,11 +96,11 @@
      * incremented by <code>len</code>.
      *
      * @param      b     the data.
      * @param      off   the start offset in the data.
      * @param      len   the number of bytes to write.
-     * @exception  IOException  if an I/O error occurs.
+     * @throws     IOException  if an I/O error occurs.
      * @see        java.io.FilterOutputStream#out
      */
     public synchronized void write(byte b[], int off, int len)
         throws IOException
     {

@@ -113,11 +113,11 @@
      * bytes to be written out to the stream.
      * <p>
      * The <code>flush</code> method of <code>DataOutputStream</code>
      * calls the <code>flush</code> method of its underlying output stream.
      *
-     * @exception  IOException  if an I/O error occurs.
+     * @throws     IOException  if an I/O error occurs.
      * @see        java.io.FilterOutputStream#out
      * @see        java.io.OutputStream#flush()
      */
     public void flush() throws IOException {
         out.flush();

@@ -130,11 +130,11 @@
      * written out as the value <code>(byte)0</code>. If no exception is
      * thrown, the counter <code>written</code> is incremented by
      * <code>1</code>.
      *
      * @param      v   a <code>boolean</code> value to be written.
-     * @exception  IOException  if an I/O error occurs.
+     * @throws     IOException  if an I/O error occurs.
      * @see        java.io.FilterOutputStream#out
      */
     public final void writeBoolean(boolean v) throws IOException {
         out.write(v ? 1 : 0);
         incCount(1);

@@ -144,11 +144,11 @@
      * Writes out a <code>byte</code> to the underlying output stream as
      * a 1-byte value. If no exception is thrown, the counter
      * <code>written</code> is incremented by <code>1</code>.
      *
      * @param      v   a <code>byte</code> value to be written.
-     * @exception  IOException  if an I/O error occurs.
+     * @throws     IOException  if an I/O error occurs.
      * @see        java.io.FilterOutputStream#out
      */
     public final void writeByte(int v) throws IOException {
         out.write(v);
         incCount(1);

@@ -158,11 +158,11 @@
      * Writes a <code>short</code> to the underlying output stream as two
      * bytes, high byte first. If no exception is thrown, the counter
      * <code>written</code> is incremented by <code>2</code>.
      *
      * @param      v   a <code>short</code> to be written.
-     * @exception  IOException  if an I/O error occurs.
+     * @throws     IOException  if an I/O error occurs.
      * @see        java.io.FilterOutputStream#out
      */
     public final void writeShort(int v) throws IOException {
         out.write((v >>> 8) & 0xFF);
         out.write((v >>> 0) & 0xFF);

@@ -173,11 +173,11 @@
      * Writes a <code>char</code> to the underlying output stream as a
      * 2-byte value, high byte first. If no exception is thrown, the
      * counter <code>written</code> is incremented by <code>2</code>.
      *
      * @param      v   a <code>char</code> value to be written.
-     * @exception  IOException  if an I/O error occurs.
+     * @throws     IOException  if an I/O error occurs.
      * @see        java.io.FilterOutputStream#out
      */
     public final void writeChar(int v) throws IOException {
         out.write((v >>> 8) & 0xFF);
         out.write((v >>> 0) & 0xFF);

@@ -188,11 +188,11 @@
      * Writes an <code>int</code> to the underlying output stream as four
      * bytes, high byte first. If no exception is thrown, the counter
      * <code>written</code> is incremented by <code>4</code>.
      *
      * @param      v   an <code>int</code> to be written.
-     * @exception  IOException  if an I/O error occurs.
+     * @throws     IOException  if an I/O error occurs.
      * @see        java.io.FilterOutputStream#out
      */
     public final void writeInt(int v) throws IOException {
         out.write((v >>> 24) & 0xFF);
         out.write((v >>> 16) & 0xFF);

@@ -207,11 +207,11 @@
      * Writes a <code>long</code> to the underlying output stream as eight
      * bytes, high byte first. In no exception is thrown, the counter
      * <code>written</code> is incremented by <code>8</code>.
      *
      * @param      v   a <code>long</code> to be written.
-     * @exception  IOException  if an I/O error occurs.
+     * @throws     IOException  if an I/O error occurs.
      * @see        java.io.FilterOutputStream#out
      */
     public final void writeLong(long v) throws IOException {
         writeBuffer[0] = (byte)(v >>> 56);
         writeBuffer[1] = (byte)(v >>> 48);

@@ -232,11 +232,11 @@
      * output stream as a 4-byte quantity, high byte first. If no
      * exception is thrown, the counter <code>written</code> is
      * incremented by <code>4</code>.
      *
      * @param      v   a <code>float</code> value to be written.
-     * @exception  IOException  if an I/O error occurs.
+     * @throws     IOException  if an I/O error occurs.
      * @see        java.io.FilterOutputStream#out
      * @see        java.lang.Float#floatToIntBits(float)
      */
     public final void writeFloat(float v) throws IOException {
         writeInt(Float.floatToIntBits(v));

@@ -249,11 +249,11 @@
      * output stream as an 8-byte quantity, high byte first. If no
      * exception is thrown, the counter <code>written</code> is
      * incremented by <code>8</code>.
      *
      * @param      v   a <code>double</code> value to be written.
-     * @exception  IOException  if an I/O error occurs.
+     * @throws     IOException  if an I/O error occurs.
      * @see        java.io.FilterOutputStream#out
      * @see        java.lang.Double#doubleToLongBits(double)
      */
     public final void writeDouble(double v) throws IOException {
         writeLong(Double.doubleToLongBits(v));

@@ -265,11 +265,11 @@
      * sequence, by discarding its high eight bits. If no exception is
      * thrown, the counter <code>written</code> is incremented by the
      * length of <code>s</code>.
      *
      * @param      s   a string of bytes to be written.
-     * @exception  IOException  if an I/O error occurs.
+     * @throws     IOException  if an I/O error occurs.
      * @see        java.io.FilterOutputStream#out
      */
     public final void writeBytes(String s) throws IOException {
         int len = s.length();
         for (int i = 0 ; i < len ; i++) {

@@ -284,11 +284,11 @@
      * if by the <code>writeChar</code> method. If no exception is
      * thrown, the counter <code>written</code> is incremented by twice
      * the length of <code>s</code>.
      *
      * @param      s   a <code>String</code> value to be written.
-     * @exception  IOException  if an I/O error occurs.
+     * @throws     IOException  if an I/O error occurs.
      * @see        java.io.DataOutputStream#writeChar(int)
      * @see        java.io.FilterOutputStream#out
      */
     public final void writeChars(String s) throws IOException {
         int len = s.length();
< prev index next >