public class ByteArrayOutputStream extends OutputStream
Constructor and Description |
---|
ByteArrayOutputStream() |
ByteArrayOutputStream(OutputStream outputStream) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush() |
byte[] |
toByteArray() |
void |
write(int b) |
void |
writeInteger(int value,
int length)
Write int in little-endian format.
|
void |
writeLong(long value,
int length)
Write long in little-endian format.
|
void |
writeString(String value) |
void |
writeZeroTerminatedString(String value) |
write, write
public ByteArrayOutputStream()
public ByteArrayOutputStream(OutputStream outputStream)
public void writeInteger(int value, int length) throws IOException
IOException
public void writeLong(long value, int length) throws IOException
IOException
public void writeString(String value) throws IOException
IOException
public void writeZeroTerminatedString(String value) throws IOException
IOException
ByteArrayInputStream.readZeroTerminatedString()
public void write(int b) throws IOException
write
in class OutputStream
IOException
public byte[] toByteArray()
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
Copyright © 2020. All rights reserved.