org.entityfs.util.io
Class RandomAccessInputStreamAdapter

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

Deprecated. Use the RandomAccessToInputStreamAdapter class instead. This class will be deleted in a future release.

@Deprecated
public class RandomAccessInputStreamAdapter
extends FilterInputStream

This adapter treats a RandomAccess object as an InputStream.

Author:
Karl Gustafsson

Field Summary
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
RandomAccessInputStreamAdapter(RandomAccess ra)
          Deprecated. Create an adapter between a RandomAccess and an InputStream.
RandomAccessInputStreamAdapter(RandomAccess ra, boolean closeRandomAccessWhenClosingStream)
          Deprecated. Create an adapter between a RandomAccess and an InputStream.
 
Method Summary
 int available()
          Deprecated.  
 void close()
          Deprecated.  
 void mark(int readLimit)
          Deprecated. This method does nothing.
 boolean markSupported()
          Deprecated.  
 int read()
          Deprecated.  
 int read(byte[] barr)
          Deprecated.  
 int read(byte[] barr, int off, int len)
          Deprecated.  
 void reset()
          Deprecated. This method does nothing.
 long skip(long n)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomAccessInputStreamAdapter

public RandomAccessInputStreamAdapter(RandomAccess ra)
Deprecated. 
Create an adapter between a RandomAccess and an InputStream.

When this adapter is closed, it closes the underlying RandomAccess object. See RandomAccessInputStreamAdapter(RandomAccess, boolean)

Parameters:
ra - The RandomAccess to adapt.

RandomAccessInputStreamAdapter

public RandomAccessInputStreamAdapter(RandomAccess ra,
                                      boolean closeRandomAccessWhenClosingStream)
Deprecated. 
Create an adapter between a RandomAccess and an InputStream.

Parameters:
ra - The RandomAccess to adapt.
closeRandomAccessWhenClosingStream - Should the RandomAccess be closed when this stream is closed?
Method Detail

available

public int available()
Deprecated. 
Overrides:
available in class FilterInputStream

mark

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

Overrides:
mark in class FilterInputStream

reset

public void reset()
Deprecated. 
This method does nothing.

Overrides:
reset in class FilterInputStream

markSupported

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

read

public int read()
Deprecated. 
Overrides:
read in class FilterInputStream

read

public int read(byte[] barr)
Deprecated. 
Overrides:
read in class FilterInputStream

read

public int read(byte[] barr,
                int off,
                int len)
Deprecated. 
Overrides:
read in class FilterInputStream

skip

public long skip(long n)
Deprecated. 
Overrides:
skip in class FilterInputStream

close

public void close()
Deprecated. 
Specified by:
close in interface Closeable
Overrides:
close in class FilterInputStream