类 ByteBufferOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- cn.mcres.karlatemp.mxlib.util.ByteBufferOutputStream
-
- 所有已实现的接口:
Closeable,Flushable,AutoCloseable
public class ByteBufferOutputStream extends OutputStream
OutputStream with ByteBuffer- 从以下版本开始:
- 2.3
-
-
字段概要
字段 修饰符和类型 字段 说明 protected ByteBufferbuffer
-
构造器概要
构造器 构造器 说明 ByteBufferOutputStream(ByteBuffer buffer)Create OutputStream as buffer.
-
-
-
字段详细资料
-
buffer
protected final ByteBuffer buffer
-
-
构造器详细资料
-
ByteBufferOutputStream
public ByteBufferOutputStream(@NotNull ByteBuffer buffer)Create OutputStream as buffer.- 参数:
buffer- The buffer using- 抛出:
IllegalArgumentException- If buffer is read only.
-
-
方法详细资料
-
write
public void write(int b) throws IOException- 指定者:
write在类中OutputStream- 抛出:
IOException
-
write
public void write(@NotNull byte[] b, int off, int len) throws IOException- 覆盖:
write在类中OutputStream- 抛出:
IOException
-
onFull
protected void onFull()
When buffer is full but need write data then will call it.Warning: The
flush()operation will also execute this method unless you override the flush method
-
flush
public void flush()
- 指定者:
flush在接口中Flushable- 覆盖:
flush在类中OutputStream
-
-