com.alibaba.dubbo.rpc.protocol.thrift.io
Class RandomAccessByteArrayOutputStream
java.lang.Object
java.io.OutputStream
com.alibaba.dubbo.rpc.protocol.thrift.io.RandomAccessByteArrayOutputStream
- All Implemented Interfaces:
- Closeable, Flushable
public class RandomAccessByteArrayOutputStream
- extends OutputStream
- Author:
- kimi
RandomAccessByteArrayOutputStream
public RandomAccessByteArrayOutputStream()
RandomAccessByteArrayOutputStream
public RandomAccessByteArrayOutputStream(int size)
write
public void write(int b)
- Specified by:
write
in class OutputStream
write
public void write(byte[] b,
int off,
int len)
- Overrides:
write
in class OutputStream
size
public int size()
setWriteIndex
public void setWriteIndex(int index)
reset
public void reset()
toByteArray
public byte[] toByteArray()
toByteBuffer
public ByteBuffer toByteBuffer()
writeTo
public void writeTo(OutputStream out)
throws IOException
- Throws:
IOException
toString
public String toString()
- Overrides:
toString
in class Object
toString
public String toString(String charset)
throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Overrides:
close
in class OutputStream
- Throws:
IOException
Copyright © 2012–2017 Alibaba. All rights reserved.