public class ByteBufferByteChannel
extends java.lang.Object
implements java.nio.channels.ByteChannel
ReadableByteChannel that is backed by a ByteBuffer.| Constructor and Description |
|---|
ByteBufferByteChannel(byte[] byteArray) |
ByteBufferByteChannel(java.nio.ByteBuffer byteBuffer) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
isOpen() |
int |
read(java.nio.ByteBuffer dst) |
int |
write(java.nio.ByteBuffer src) |
public ByteBufferByteChannel(byte[] byteArray)
public ByteBufferByteChannel(java.nio.ByteBuffer byteBuffer)
public int read(java.nio.ByteBuffer dst)
throws java.io.IOException
read in interface java.nio.channels.ReadableByteChanneljava.io.IOExceptionpublic boolean isOpen()
isOpen in interface java.nio.channels.Channelpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface java.nio.channels.Channeljava.io.IOExceptionpublic int write(java.nio.ByteBuffer src)
throws java.io.IOException
write in interface java.nio.channels.WritableByteChanneljava.io.IOExceptionCopyright © 2020. All rights reserved.