checkstyle

This commit is contained in:
jendave
2011-10-25 15:41:36 +00:00
parent 942649e5a5
commit 5f3b16f4d0
13 changed files with 920 additions and 522 deletions

View File

@@ -5,7 +5,7 @@ import java.io.OutputStream;
/**
* An OutputStream that writes to multiple other OutputStreams.
*
*
* @author Forge
* @version $Id$
*/
@@ -13,25 +13,32 @@ public class MultiplexOutputStream extends OutputStream {
private final OutputStream[] streams;
/**
* <p>Constructor for MultiplexOutputStream.</p>
*
* @param streams a {@link java.io.OutputStream} object.
* <p>
* Constructor for MultiplexOutputStream.
* </p>
*
* @param streams
* a {@link java.io.OutputStream} object.
*/
public MultiplexOutputStream(OutputStream... streams) {
public MultiplexOutputStream(final OutputStream... streams) {
super();
if (streams == null) throw new IllegalArgumentException("streams cannot be null.");
if (streams == null) {
throw new IllegalArgumentException("streams cannot be null.");
}
this.streams = streams;
}
/** {@inheritDoc} */
public void write(int b) throws IOException {
for (int i = 0; i < streams.length; i++)
public final void write(final int b) throws IOException {
for (int i = 0; i < streams.length; i++) {
streams[i].write(b);
}
}
/** {@inheritDoc} */
public void write(byte[] b, int off, int len) throws IOException {
for (int i = 0; i < streams.length; i++)
public final void write(final byte[] b, final int off, final int len) throws IOException {
for (int i = 0; i < streams.length; i++) {
streams[i].write(b, off, len);
}
}
}