jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ByteOutputStream.java
changeset 43852 93a527059d8a
parent 28326 2b9860c0d68a
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ByteOutputStream.java	Fri Feb 10 00:39:51 2017 -0800
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ByteOutputStream.java	Thu Feb 16 13:14:39 2017 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -42,6 +42,7 @@
  * <li>doesn't do synchronization
  * <li>allows access to the raw buffer
  * <li>almost no parameter check
+ * </ol>
  */
 public final class ByteOutputStream extends OutputStream {
     /**
@@ -64,6 +65,9 @@
 
     /**
      * Copies all the bytes from this input into this buffer.
+     *
+     * @param in input stream.
+     * @exception IOException in case of an I/O error.
      */
     public void write(InputStream in) throws IOException {
         if (in instanceof ByteArrayInputStream) {
@@ -84,6 +88,7 @@
         }
     }
 
+    @Override
     public void write(int b) {
         ensureCapacity(1);
         buf[count] = (byte) b;
@@ -102,18 +107,22 @@
         }
     }
 
+    @Override
     public void write(byte[] b, int off, int len) {
         ensureCapacity(len);
         System.arraycopy(b, off, buf, count, len);
         count += len;
     }
 
+    @Override
     public void write(byte[] b) {
         write(b, 0, b.length);
     }
 
     /**
      * Writes a string as ASCII string.
+     *
+     * @param s string to write.
      */
     public void writeAsAscii(String s) {
         int len = s.length();
@@ -138,9 +147,12 @@
      * Evil buffer reallocation method.
      * Don't use it unless you absolutely have to.
      *
+     * @return byte array
+     *
      * @deprecated
      *      because this is evil!
      */
+    @Deprecated
     public byte toByteArray()[] {
         byte[] newbuf = new byte[count];
         System.arraycopy(buf, 0, newbuf, 0, count);
@@ -162,10 +174,12 @@
      * @return String translated from the buffer's contents.
      * @since JDK1.1
      */
+    @Override
     public String toString() {
         return new String(buf, 0, count);
     }
 
+    @Override
     public void close() {
     }