Package org.apache.felix.gogo.runtime
Class Pipe.RefByteChannel
- java.lang.Object
-
- org.apache.felix.gogo.runtime.Pipe.RefByteChannel
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,java.nio.channels.ByteChannel,java.nio.channels.Channel,java.nio.channels.ReadableByteChannel,java.nio.channels.WritableByteChannel
- Enclosing class:
- Pipe
private class Pipe.RefByteChannel extends java.lang.Object implements java.nio.channels.ByteChannel
-
-
Field Summary
Fields Modifier and Type Field Description private java.nio.channels.Channelchannelprivate java.util.concurrent.atomic.AtomicBooleanclosedprivate java.util.concurrent.atomic.AtomicIntegerreferences
-
Constructor Summary
Constructors Constructor Description RefByteChannel(java.nio.channels.Channel channel, java.util.concurrent.atomic.AtomicInteger references)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()private voidensureOpen()booleanisOpen()intread(java.nio.ByteBuffer dst)intwrite(java.nio.ByteBuffer src)
-
-
-
Method Detail
-
read
public int read(java.nio.ByteBuffer dst) throws java.io.IOException- Specified by:
readin interfacejava.nio.channels.ReadableByteChannel- Throws:
java.io.IOException
-
write
public int write(java.nio.ByteBuffer src) throws java.io.IOException- Specified by:
writein interfacejava.nio.channels.WritableByteChannel- Throws:
java.io.IOException
-
isOpen
public boolean isOpen()
- Specified by:
isOpenin interfacejava.nio.channels.Channel
-
ensureOpen
private void ensureOpen() throws java.nio.channels.ClosedChannelException- Throws:
java.nio.channels.ClosedChannelException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.nio.channels.Channel- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
-