Skip to content

Commit 76c4ec2

Browse files
committed
Fix funky formating.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/io/trunk@1737897 13f79535-47bb-0310-9956-ffa450edef68
1 parent 9146eca commit 76c4ec2

1 file changed

Lines changed: 21 additions & 29 deletions

File tree

src/main/java/org/apache/commons/io/output/DemuxOutputStream.java

Lines changed: 21 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -20,75 +20,67 @@
2020
import java.io.OutputStream;
2121

2222
/**
23-
* Data written to this stream is forwarded to a stream that has been associated
24-
* with this thread.
23+
* Data written to this stream is forwarded to a stream that has been associated with this thread.
2524
*
2625
* @version $Id$
2726
*/
28-
public class DemuxOutputStream
29-
extends OutputStream
30-
{
27+
public class DemuxOutputStream extends OutputStream {
3128
private final InheritableThreadLocal<OutputStream> m_streams = new InheritableThreadLocal<OutputStream>();
3229

3330
/**
3431
* Bind the specified stream to the current thread.
3532
*
36-
* @param output the stream to bind
33+
* @param output
34+
* the stream to bind
3735
* @return the OutputStream that was previously active
3836
*/
39-
public OutputStream bindStream( final OutputStream output )
40-
{
37+
public OutputStream bindStream(final OutputStream output) {
4138
final OutputStream stream = m_streams.get();
42-
m_streams.set( output );
39+
m_streams.set(output);
4340
return stream;
4441
}
4542

4643
/**
4744
* Closes stream associated with current thread.
4845
*
49-
* @throws IOException if an error occurs
46+
* @throws IOException
47+
* if an error occurs
5048
*/
5149
@Override
52-
public void close()
53-
throws IOException
54-
{
50+
public void close() throws IOException {
5551
final OutputStream output = m_streams.get();
56-
if( null != output )
57-
{
52+
if (null != output) {
5853
output.close();
5954
}
6055
}
6156

6257
/**
6358
* Flushes stream associated with current thread.
6459
*
65-
* @throws IOException if an error occurs
60+
* @throws IOException
61+
* if an error occurs
6662
*/
6763
@Override
68-
public void flush()
69-
throws IOException
70-
{
64+
public void flush() throws IOException {
7165
final OutputStream output = m_streams.get();
72-
if( null != output )
73-
{
66+
if (null != output) {
7467
output.flush();
7568
}
7669
}
7770

7871
/**
7972
* Writes byte to stream associated with current thread.
8073
*
81-
* @param ch the byte to write to stream
82-
* @throws IOException if an error occurs
74+
* @param ch
75+
* the byte to write to stream
76+
* @throws IOException
77+
* if an error occurs
8378
*/
8479
@Override
85-
public void write( final int ch )
86-
throws IOException
87-
{
80+
public void write(final int ch) throws IOException {
8881
final OutputStream output = m_streams.get();
89-
if( null != output )
90-
{
91-
output.write( ch );
82+
if (null != output) {
83+
output.write(ch);
9284
}
9385
}
9486
}

0 commit comments

Comments
 (0)