org.entityfs.util.io
Class DataSinkToOutputStreamAdapter

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by org.entityfs.util.io.DataSinkToOutputStreamAdapter
All Implemented Interfaces:
Closeable, Flushable

public class DataSinkToOutputStreamAdapter
extends FilterOutputStream

This object is used to adapt a DataSink to an OutputStream.

Since:
1.1
Author:
Karl Gustafsson
See Also:
DataSourceToInputStreamAdapter, OutputStreamToDataSinkAdapter

Field Summary
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
DataSinkToOutputStreamAdapter(DataSink adapted)
           
 
Method Summary
 void close()
           
 void flush()
           
 void write(byte[] barr)
           
 void write(byte[] barr, 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

DataSinkToOutputStreamAdapter

public DataSinkToOutputStreamAdapter(DataSink adapted)
Method Detail

write

public void write(byte[] barr)
           throws IOException
Overrides:
write in class FilterOutputStream
Throws:
IOException

write

public void write(byte[] barr,
                  int off,
                  int len)
           throws IOException
Overrides:
write in class FilterOutputStream
Throws:
IOException

write

public void write(int b)
           throws IOException
Overrides:
write in class FilterOutputStream
Throws:
IOException

flush

public void flush()
           throws IOException
Specified by:
flush in interface Flushable
Overrides:
flush in class FilterOutputStream
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class FilterOutputStream
Throws:
IOException