winstone
Class ClientOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by winstone.ClientOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class ClientOutputStream
extends java.io.OutputStream

Wrap an OutputStream so that we can distinguish errors writing to clients.

Those are normally caused by a browser aborting a connection, and note worthwhile to report to log.

Author:
Kohsuke Kawaguchi

Constructor Summary
ClientOutputStream(java.io.OutputStream out)
           
 
Method Summary
 void close()
           
 void flush()
           
 void write(byte[] b)
           
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientOutputStream

public ClientOutputStream(java.io.OutputStream out)
Method Detail

write

public void write(int b)
           throws ClientSocketException
Specified by:
write in class java.io.OutputStream
Throws:
ClientSocketException

write

public void write(byte[] b)
           throws ClientSocketException
Overrides:
write in class java.io.OutputStream
Throws:
ClientSocketException

write

public void write(byte[] b,
                  int off,
                  int len)
           throws ClientSocketException
Overrides:
write in class java.io.OutputStream
Throws:
ClientSocketException

flush

public void flush()
           throws java.io.IOException
Specified by:
flush in interface java.io.Flushable
Overrides:
flush in class java.io.OutputStream
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.OutputStream
Throws:
java.io.IOException


Copyright © 2013. All Rights Reserved.