public final class ByteArrayOStream extends OutputStream
ByteArrayIStream without intermediate array copies.All argument validation is disabled in release mode.
NOTE: copy-on-write not supported
| 构造器和说明 |
|---|
ByteArrayOStream(int initialCapacity)
Callee takes ownership of 'buf'.
|
| 限定符和类型 | 方法和说明 |
|---|---|
int |
capacity() |
void |
close()
Equivalent to
reset(). |
byte[] |
copyByteArray() |
byte[] |
getByteArray() |
void |
reset()
Does not reduce the current capacity.
|
int |
size() |
ByteArrayIStream |
toByteIStream() |
void |
write(byte[] buf,
int offset,
int length) |
void |
write(int b) |
void |
write2(int b1,
int b2) |
void |
write3(int b1,
int b2,
int b3) |
void |
write4(int b1,
int b2,
int b3,
int b4) |
void |
writeTo(OutputStream out) |
flush, writepublic ByteArrayOStream(int initialCapacity)
public final ByteArrayIStream toByteIStream()
public final void write2(int b1,
int b2)
public final void write3(int b1,
int b2,
int b3)
public final void write4(int b1,
int b2,
int b3,
int b4)
public final void writeTo(OutputStream out) throws IOException
IOExceptionpublic final byte[] getByteArray()
public final byte[] copyByteArray()
public final int size()
public final int capacity()
public final void reset()
public final void write(int b)
write 在类中 OutputStreampublic final void write(byte[] buf,
int offset,
int length)
write 在类中 OutputStreampublic final void close()
reset().close 在接口中 Closeableclose 在接口中 AutoCloseableclose 在类中 OutputStreamCopyright © 2018. All rights reserved.