removed unnecessary class

fixed test so that not all data is written at once
This commit is contained in:
Tom Hombergs 2018-03-18 20:13:42 +01:00
parent 2fe8d8810d
commit 5ce09eb2eb
2 changed files with 3 additions and 8 deletions

View File

@ -1,5 +0,0 @@
package org.baeldung.guava;
public class CountingByteWritter {
}

View File

@ -18,9 +18,9 @@ public class GuavaCountingOutputStreamTest {
byte[] data = new byte[1024];
ByteArrayInputStream in = new ByteArrayInputStream(data);
while (in.read() != -1) {
cos.write(data);
cos.flush();
int b;
while ((b = in.read()) != -1) {
cos.write(b);
if (cos.getCount() >= MAX) {
throw new RuntimeException("Write limit reached");
}