org.activeio.adapter
Class SyncChannelToInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by org.activeio.adapter.SyncChannelToInputStream
All Implemented Interfaces:
Closeable

public class SyncChannelToInputStream
extends InputStream

Provides an InputStream for a given SynchChannel.

Version:
$Revision$

Constructor Summary
SyncChannelToInputStream(SyncChannel channel)
           
 
Method Summary
 void close()
           
 long getTimeout()
           
 boolean isClosed()
           
 int read()
           
 int read(byte[] b, int off, int len)
           
 void setTimeout(long timeout)
           
 
Methods inherited from class java.io.InputStream
available, mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SyncChannelToInputStream

public SyncChannelToInputStream(SyncChannel channel)
Parameters:
channel -
Method Detail

read

public int read()
         throws IOException
Specified by:
read in class InputStream
Throws:
IOException
See Also:
InputStream.read()

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Overrides:
read in class InputStream
Throws:
IOException
See Also:
InputStream.read(byte[], int, int)

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class InputStream
Throws:
IOException
See Also:
InputStream.close()

isClosed

public boolean isClosed()

setTimeout

public void setTimeout(long timeout)
Parameters:
timeout -

getTimeout

public long getTimeout()
Returns:


Copyright © -2009 The ActiveIO Project. All Rights Reserved.