public class BINOutputStream extends FilterOutputStream
Note that the "virtual" characters FRAME_START and FRAME_END are exceptions, they are translated to the respective tokens as given by the specification.
ModbusBINTransport#FRAME_START,
ModbusBINTransport#FRAME_ENDout| Constructor and Description |
|---|
BINOutputStream(OutputStream out)
Constructs a new BINOutputStream instance
writing to the given OutputStream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
write(byte[] data)
Writes an array of bytes to the raw output stream.
|
void |
write(byte[] data,
int off,
int len)
Writes an array of bytes to the raw output stream.
|
void |
write(int b)
Writes a byte to the raw output stream.
|
close, flushpublic BINOutputStream(OutputStream out)
out - a base output stream instance to be wrapped.public void write(int b)
throws IOException
write in class FilterOutputStreamb - the byte to be written as int.IOException - if an I/O error occurs.public void write(byte[] data)
throws IOException
write in class FilterOutputStreamdata - the byte[] to be written.IOException - if an I/O error occurs.public void write(byte[] data,
int off,
int len)
throws IOException
write in class FilterOutputStreamdata - the byte[] to be written.off - the offset into the data to start writing from.len - the number of bytes to be written from off.IOException - if an I/O error occurs.Copyright © 2017. All rights reserved.