org.entityfs.util.io
Class DataSourceToInputStreamAdapter

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by org.entityfs.util.io.DataSourceToInputStreamAdapter
All Implemented Interfaces:
Closeable

public class DataSourceToInputStreamAdapter
extends FilterInputStream

This object is used to adapt a DataSource to an InputStream.

Since:
1.1
Author:
Karl Gustafsson
See Also:
DataSinkToOutputStreamAdapter, InputStreamToDataSourceAdapter
In_jar:
entityfs-core

Field Summary
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
DataSourceToInputStreamAdapter(DataSource adapted)
           
 
Method Summary
 int available()
           
 void close()
           
 void mark(int readLimit)
          This method does nothing.
 boolean markSupported()
           
 int read()
           
 int read(byte[] barr)
           
 int read(byte[] barr, int off, int len)
           
 void reset()
          This method does nothing.
 long skip(long n)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataSourceToInputStreamAdapter

public DataSourceToInputStreamAdapter(DataSource adapted)
Method Detail

available

public int available()
              throws IOException
Overrides:
available in class FilterInputStream
Throws:
IOException

mark

public void mark(int readLimit)
This method does nothing.

Overrides:
mark in class FilterInputStream

reset

public void reset()
This method does nothing.

Overrides:
reset in class FilterInputStream

markSupported

public boolean markSupported()
Overrides:
markSupported in class FilterInputStream
Returns:
false.

read

public int read()
         throws IOException
Overrides:
read in class FilterInputStream
Throws:
IOException

read

public int read(byte[] barr)
         throws IOException
Overrides:
read in class FilterInputStream
Throws:
IOException

read

public int read(byte[] barr,
                int off,
                int len)
         throws IOException
Overrides:
read in class FilterInputStream
Throws:
IOException

skip

public long skip(long n)
          throws IOException
Overrides:
skip in class FilterInputStream
Throws:
IOException

close

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