Android Developers Docs Reference added in API level 1 Summary: Inherited Methods ByteChannel public interface ByteChannel implements ReadableByteChannel, WritableByteChannel java.nio.channels.ByteChannel Known indirect subclasses DatagramChannel, FileChannel, SeekableByteChannel, SocketChannel DatagramChannel A selectable channel for datagram-oriented sockets. FileChannel A channel for reading, writing, mapping, and manipulating a file. SeekableByteChannel A byte channel that maintains a current position and allows the position to be changed. SocketChannel A selectable channel for stream-oriented connecting sockets. A channel that can read and write bytes. This interface simply unifies ReadableByteChannel and WritableByteChannel; it does not specify any new operations. Summary Inherited methods From interface java.nio.channels.ReadableByteChannel abstract int read(ByteBuffer dst) Reads a sequence of bytes from this channel into the given buffer. From interface java.nio.channels.WritableByteChannel abstract int write(ByteBuffer src) Writes a sequence of bytes to this channel from the given buffer. From interface java.nio.channels.Channel abstract void close() Closes this channel. abstract boolean isOpen() Tells whether or not this channel is open. From interface java.io.Closeable abstract void close() Closes this stream and releases any system resources associated with it. From interface java.lang.AutoCloseable abstract void close() Closes this resource, relinquishing any underlying resources. Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License, and code samples are licensed under the Apache 2.0 License. For details, see our Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Last updated May 8, 2018.