org.jruby.util.io
Class SplitChannel

java.lang.Object
  extended by org.jruby.util.io.SplitChannel
All Implemented Interfaces:
java.io.Closeable, java.nio.channels.Channel, java.nio.channels.ReadableByteChannel, java.nio.channels.WritableByteChannel

public class SplitChannel
extends java.lang.Object
implements java.nio.channels.ReadableByteChannel, java.nio.channels.WritableByteChannel


Constructor Summary
SplitChannel(java.nio.channels.ReadableByteChannel inChannel, java.nio.channels.WritableByteChannel outChannel)
           
 
Method Summary
 void close()
           
 void closeRead()
           
 void closeWrite()
           
 boolean isOpen()
           
 int read(java.nio.ByteBuffer buffer)
           
 int write(java.nio.ByteBuffer buffer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SplitChannel

public SplitChannel(java.nio.channels.ReadableByteChannel inChannel,
                    java.nio.channels.WritableByteChannel outChannel)
Method Detail

read

public int read(java.nio.ByteBuffer buffer)
         throws java.io.IOException
Specified by:
read in interface java.nio.channels.ReadableByteChannel
Throws:
java.io.IOException

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

closeRead

public void closeRead()
               throws java.io.IOException
Throws:
java.io.IOException

closeWrite

public void closeWrite()
                throws java.io.IOException
Throws:
java.io.IOException

write

public int write(java.nio.ByteBuffer buffer)
          throws java.io.IOException
Specified by:
write in interface java.nio.channels.WritableByteChannel
Throws:
java.io.IOException


Copyright © 2002-2007 JRuby Team. All Rights Reserved.