Refactor ByteArrayOutputStream into synchronized and
unsynchronized versions
Simplify method name.
MODIFY
src/changes/changes.xml
src/changes/changes.xml
@@ -201,6 +201,9 @@ The <action> type attribute can be add,update,fix,remove.
<action issue="IO-648" dev="ggregory" type="add" due-to="Adam Retter, Alex Herbert, Gary Gregory">
Refactor ByteArrayOutputStream into synchronized and unsynchronized versions #108.
</action>
+ <action issue="IO-662" dev="ggregory" type="add" due-to="Adam Retter, Gary Gregory">
+ Refactor ByteArrayOutputStream into synchronized and unsynchronized versions #108.
+ </action>
</release>
<release version="2.6" date="2017-10-15" description="Java 7 required, Java 9 supported.">

MODIFY
src/main/java/org/apache/commons/io/output/AbstractByteArrayOutputStream.java
src/main/java/org/apache/commons/io/output/AbstractByteArrayOutputStream.java
@@ -303,7 +303,7 @@ protected void writeToImpl(final OutputStream out) throws IOException {
* @see #reset()
* @since 2.7
*/
- protected <T extends InputStream> InputStream toInputStreamImpl(
+ protected <T extends InputStream> InputStream toInputStream(
final InputStreamConstructor<T> isConstructor) {
int remaining = count;
if (remaining == 0) {

MODIFY
src/main/java/org/apache/commons/io/output/ByteArrayOutputStream.java
src/main/java/org/apache/commons/io/output/ByteArrayOutputStream.java
@@ -158,7 +158,7 @@ public static InputStream toBufferedInputStream(final InputStream input, final i
@Override
public synchronized InputStream toInputStream() {
- return toInputStreamImpl(java.io.ByteArrayInputStream::new);
+ return toInputStream(java.io.ByteArrayInputStream::new);
}
@Override

MODIFY
src/main/java/org/apache/commons/io/output/UnsynchronizedByteArrayOutputStream.java
src/main/java/org/apache/commons/io/output/UnsynchronizedByteArrayOutputStream.java
@@ -155,7 +155,7 @@ public static InputStream toBufferedInputStream(final InputStream input, final i
@Override
public InputStream toInputStream() {
- return toInputStreamImpl(UnsynchronizedByteArrayInputStream::new);
+ return toInputStream(UnsynchronizedByteArrayInputStream::new);
}
@Override

[IO-662] Refactor ByteArrayOutputStream into synchronized and
unsynchronized versions #108.

Simplify method name.