com.sun.grizzly.utils
Class ReadableInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by com.sun.grizzly.utils.ReadableInputStream
All Implemented Interfaces:
Closeable

public class ReadableInputStream
extends InputStream

Bridge between Readable and InputStream

Author:
Alexey Stashok

Constructor Summary
ReadableInputStream()
           
 
Method Summary
 void close()
           
protected  void doBlockingRead()
           
 Buffer getBuffer()
           
 Readable getReadable()
           
 long getTimeout(TimeUnit unit)
           
 int read()
           
 int read(byte[] b, int off, int len)
           
 void setBuffer(Buffer buffer)
           
 void setReadable(Readable readable)
           
 void setTimeout(long timeout, TimeUnit unit)
           
 
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

ReadableInputStream

public ReadableInputStream()
Method Detail

getReadable

public Readable getReadable()

setReadable

public void setReadable(Readable readable)

getBuffer

public Buffer getBuffer()

setBuffer

public void setBuffer(Buffer buffer)

getTimeout

public long getTimeout(TimeUnit unit)

setTimeout

public void setTimeout(long timeout,
                       TimeUnit unit)

read

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

read

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

close

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

doBlockingRead

protected void doBlockingRead()
                       throws IOException
Throws:
IOException


Copyright © 2009 SUN Microsystems. All Rights Reserved.