--- old/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ByteOutputStream.java 2017-02-14 14:25:45.600229506 +0300
+++ new/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ByteOutputStream.java 2017-02-14 14:25:45.500228867 +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 @@
*
doesn't do synchronization
* allows access to the raw buffer
* almost no parameter check
+ *
*/
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() {
}