@Test public void testBasicWrite() throws IOException { for (int i = 0; i < INITIAL_SIZE; ++i) { stream.write(i); } final byte[] chunk = assertFinishedStream(INITIAL_SIZE, 1).get(0); assertEquals(INITIAL_SIZE, chunk.length); for (int i = 0; i < INITIAL_SIZE; ++i) { assertEquals((byte) i, chunk[i]); } }
@Override @SuppressWarnings("checkstyle:ParameterName") public void write(final int b) throws IOException { checkNotClosed(); ensureOneByte(); currentChunk[currentOffset] = (byte) b; currentOffset++; size++; }
ChunkedOutputStream extends OutputStream { @Override @SuppressWarnings("checkstyle:ParameterName") public void write(final int b) throws IOException { checkNotClosed(); ensureOneByte(); currentChunk[currentOffset] = (byte) b; currentOffset++; size++; } }
ChunkedOutputStream extends OutputStream { @Override @SuppressWarnings("checkstyle:ParameterName") public void write(final int b) throws IOException { checkNotClosed(); ensureOneByte(); currentChunk[currentOffset] = (byte) b; currentOffset++; size++; } ChunkedOutputStream(final int requestedInitialCapacity); }
ChunkedOutputStream extends OutputStream { @Override @SuppressWarnings("checkstyle:ParameterName") public void write(final int b) throws IOException { checkNotClosed(); ensureOneByte(); currentChunk[currentOffset] = (byte) b; currentOffset++; size++; } ChunkedOutputStream(final int requestedInitialCapacity); @Override @SuppressWarnings("checkstyle:ParameterName") void write(final int b); @Override @SuppressWarnings("checkstyle:ParameterName") void write(final byte[] b, final int off, final int len); @Override void close(); }
ChunkedOutputStream extends OutputStream { @Override @SuppressWarnings("checkstyle:ParameterName") public void write(final int b) throws IOException { checkNotClosed(); ensureOneByte(); currentChunk[currentOffset] = (byte) b; currentOffset++; size++; } ChunkedOutputStream(final int requestedInitialCapacity); @Override @SuppressWarnings("checkstyle:ParameterName") void write(final int b); @Override @SuppressWarnings("checkstyle:ParameterName") void write(final byte[] b, final int off, final int len); @Override void close();  }