public class ASCIIOutputStream extends FilterOutputStream
net.wimpi.modbus.io.ModbusASCIITransport#FRAME_START,
net.wimpi.modbus.io.ModbusASCIITransport#FRAME_ENDout| Constructor and Description |
|---|
ASCIIOutputStream(OutputStream out)
Constructs a new ASCIIOutputStream instance
writing to the given OutputStream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
write(byte[] data)
Writes an array of bytes encoded as two hexadecimal
characters to the raw output stream.
|
void |
write(byte[] data,
int off,
int len)
Writes an array of bytes encoded as two hexadecimal
characters to the raw output stream.
|
void |
write(int b)
Writes a byte encoded as two hexadecimal characters to
the raw output stream.
|
close, flushpublic ASCIIOutputStream(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.