public class Output extends Object implements Closeable
| Constructor and Description |
|---|
Output() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
byte[] |
toByteArray()
Returns byte array representation of this output class.
|
Output |
write(byte[] bytes)
Writes the byte array to the output.
|
Output |
write(byte[] bytes,
int offset,
int length)
Writes the byte array to the output with specified offset and fixed length.
|
Output |
write(String string)
Writes the string to the output.
|
public Output write(String string)
string - string to write to this outputpublic Output write(byte[] bytes)
bytes - byte arrays to write to this outputpublic Output write(byte[] bytes, int offset, int length)
bytes - byte arrays to write to this outputoffset - the offset within the array of the first byte to be read. Must be non-negative and no larger than bytes.lengthlength - the number of bytes to be read from the given arraypublic byte[] toByteArray()
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2016–2019. All rights reserved.