rasmus.util
Class NonBlockingReadableByteChannel
java.lang.Object
rasmus.util.NonBlockingReadableByteChannel
- All Implemented Interfaces:
- java.io.Closeable, java.lang.Runnable, java.nio.channels.Channel, java.nio.channels.ReadableByteChannel
public class NonBlockingReadableByteChannel
- extends java.lang.Object
- implements java.lang.Runnable, java.nio.channels.ReadableByteChannel
Method Summary |
void |
close()
|
boolean |
isOpen()
|
int |
read(java.nio.ByteBuffer buffer)
|
void |
run()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NonBlockingReadableByteChannel
public NonBlockingReadableByteChannel(NonBlockingReadableByteChannel channel)
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
NonBlockingReadableByteChannel
public NonBlockingReadableByteChannel(java.nio.channels.FileChannel filechannel,
long pos,
int buffersize)
throws java.lang.Exception
- Throws:
java.lang.Exception
run
public void run()
- Specified by:
run
in interface java.lang.Runnable
read
public int read(java.nio.ByteBuffer buffer)
- Specified by:
read
in interface java.nio.channels.ReadableByteChannel
isOpen
public boolean isOpen()
- Specified by:
isOpen
in interface java.nio.channels.Channel
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface java.io.Closeable
- Specified by:
close
in interface java.nio.channels.Channel
- Throws:
java.io.IOException