类 ByteBufferOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- net.dongliu.commons.io.ByteBufferOutputStream
-
- 所有已实现的接口:
java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable
public class ByteBufferOutputStream extends java.io.OutputStreamA OutputStream that write date to ByteBuffer. After closed, the ByteBuffer contains the data can be get bygetBuffer()
-
-
构造器概要
构造器 构造器 说明 ByteBufferOutputStream(boolean direct)Create a new ByteBufferOutputStream.
-
-
-
方法详细资料
-
getBuffer
public java.nio.ByteBuffer getBuffer()
Get the underlying ByteBuffer contains the result data ready for read. This method should be called afterclose()method- 抛出:
java.lang.IllegalStateException- if stream not closed.
-
write
public void write(byte[] b) throws java.io.IOException- 覆盖:
write在类中java.io.OutputStream- 抛出:
java.io.IOException
-
write
public void write(byte[] b, int off, int len) throws java.io.IOException- 覆盖:
write在类中java.io.OutputStream- 抛出:
java.io.IOException
-
flush
public void flush() throws java.io.IOException- 指定者:
flush在接口中java.io.Flushable- 覆盖:
flush在类中java.io.OutputStream- 抛出:
java.io.IOException
-
close
public void close() throws java.io.IOException- 指定者:
close在接口中java.lang.AutoCloseable- 指定者:
close在接口中java.io.Closeable- 覆盖:
close在类中java.io.OutputStream- 抛出:
java.io.IOException
-
write
public void write(int b) throws java.io.IOException- 指定者:
write在类中java.io.OutputStream- 抛出:
java.io.IOException
-
-