org.apache.clerezza.triaxrs.util
Class FirstByteActionOutputStream
java.lang.Object
java.io.OutputStream
org.apache.clerezza.triaxrs.util.FirstByteActionOutputStream
- All Implemented Interfaces:
- Closeable, Flushable
public class FirstByteActionOutputStream
- extends OutputStream
An outputstream that executes an action when the firts character is writter,
if no chracter is written the actin is executed when closing the stream
- Author:
- reto
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FirstByteActionOutputStream
public FirstByteActionOutputStream(OutputStream base,
Runnable action)
write
public void write(int b)
throws IOException
- Specified by:
write in class OutputStream
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close in interface Closeable- Overrides:
close in class OutputStream
- Throws:
IOException
flush
public void flush()
throws IOException
- Specified by:
flush in interface Flushable- Overrides:
flush in class OutputStream
- Throws:
IOException
Copyright © 2012 The Apache Software Foundation. All Rights Reserved.