public interface SerialDataWriter
Modifier and Type | Method and Description |
---|---|
void |
write(byte... data)
Sends one of more bytes to the serial device identified by the given file descriptor.
|
void |
write(byte[]... data)
Sends one of more bytes arrays to the serial device identified by the given file descriptor.
|
void |
write(byte[] data,
int offset,
int length)
Sends an array of bytes to the serial port/device identified by the given file descriptor.
|
void |
write(ByteBuffer... data)
Read the content of byte buffer and write the data to the serial port transmit buffer.
|
void |
write(char... data)
Sends an array of ASCII characters to the serial port/device identified by the given file descriptor.
|
void |
write(CharBuffer... data)
Sends one or more ASCII CharBuffers to the serial port/device identified by the given file descriptor.
|
void |
write(CharSequence... data)
Sends one or more ASCII string objects to the serial port/device identified by the given file descriptor.
|
void |
write(Charset charset,
char... data)
Sends an array of characters to the serial port/device identified by the given file descriptor.
|
void |
write(Charset charset,
char[] data,
int offset,
int length)
Sends an array of characters to the serial port/device identified by the given file descriptor.
|
void |
write(Charset charset,
CharBuffer... data)
Sends one or more CharBuffers to the serial port/device identified by the given file descriptor.
|
void |
write(Charset charset,
CharSequence... data)
Sends one or more string objects to the serial port/device identified by the given file descriptor.
|
void |
write(Charset charset,
Collection<? extends CharSequence> data)
Sends a collection of string objects to the serial port/device identified by the given file descriptor.
|
void |
write(Collection<? extends CharSequence> data)
Sends a collection of ASCII string objects to the serial port/device identified by the given file descriptor.
|
void |
write(InputStream input)
Read content from an input stream of data and write it to the serial port transmit buffer.
|
void |
writeln(CharSequence... data)
Sends one or more ASCII string objects each appended with a line terminator (CR+LF) to the serial port/device.
|
void |
writeln(Charset charset,
CharSequence... data)
Sends one or more string objects each appended with a line terminator (CR+LF) to the serial port/device.
|
void |
writeln(Charset charset,
Collection<? extends CharSequence> data)
Sends a collection of string objects each appended with a line terminator (CR+LF) to the serial port/device.
|
void |
writeln(Collection<? extends CharSequence> data)
Sends a collection of ASCII string objects each appended with a line terminator (CR+LF) to the serial port/device.
|
void write(byte[] data, int offset, int length) throws IllegalStateException, IOException
Sends an array of bytes to the serial port/device identified by the given file descriptor.
data
- A ByteBuffer of data to be transmitted.offset
- The starting index (inclusive) in the array to send from.length
- The number of bytes from the byte array to transmit to the serial port.IllegalStateException
IOException
void write(byte... data) throws IllegalStateException, IOException
Sends one of more bytes to the serial device identified by the given file descriptor.
data
- One or more bytes (or an array) of data to be transmitted. (variable-length-argument)IllegalStateException
IOException
void write(byte[]... data) throws IllegalStateException, IOException
Sends one of more bytes arrays to the serial device identified by the given file descriptor.
data
- One or more byte arrays of data to be transmitted. (variable-length-argument)IllegalStateException
IOException
void write(ByteBuffer... data) throws IllegalStateException, IOException
data
- A ByteBuffer of data to be transmitted.IllegalStateException
IOException
void write(InputStream input) throws IllegalStateException, IOException
input
- An InputStream of data to be transmittedIllegalStateException
IOException
void write(Charset charset, char[] data, int offset, int length) throws IllegalStateException, IOException
Sends an array of characters to the serial port/device identified by the given file descriptor.
charset
- The character set to use for encoding/decoding bytes to/from text charactersdata
- An array of chars to be decoded into bytes and transmitted.offset
- The starting index (inclusive) in the array to send from.length
- The number of characters from the char array to transmit to the serial port.IllegalStateException
IOException
void write(Charset charset, char... data) throws IllegalStateException, IOException
Sends an array of characters to the serial port/device identified by the given file descriptor.
charset
- The character set to use for encoding/decoding bytes to/from text charactersdata
- One or more characters (or an array) of data to be transmitted. (variable-length-argument)IllegalStateException
IOException
void write(char... data) throws IllegalStateException, IOException
Sends an array of ASCII characters to the serial port/device identified by the given file descriptor.
data
- One or more ASCII characters (or an array) of data to be transmitted. (variable-length-argument)IllegalStateException
IOException
void write(Charset charset, CharBuffer... data) throws IllegalStateException, IOException
Sends one or more CharBuffers to the serial port/device identified by the given file descriptor.
charset
- The character set to use for encoding/decoding bytes to/from text charactersdata
- One or more CharBuffers (or an array) of data to be transmitted. (variable-length-argument)IllegalStateException
IOException
void write(CharBuffer... data) throws IllegalStateException, IOException
Sends one or more ASCII CharBuffers to the serial port/device identified by the given file descriptor.
data
- One or more ASCII CharBuffers (or an array) of data to be transmitted. (variable-length-argument)IllegalStateException
IOException
void write(Charset charset, CharSequence... data) throws IllegalStateException, IOException
Sends one or more string objects to the serial port/device identified by the given file descriptor.
charset
- The character set to use for encoding/decoding bytes to/from text charactersdata
- One or more string objects (or an array) of data to be transmitted. (variable-length-argument)IllegalStateException
IOException
void write(CharSequence... data) throws IllegalStateException, IOException
Sends one or more ASCII string objects to the serial port/device identified by the given file descriptor.
data
- One or more ASCII string objects (or an array) of data to be transmitted. (variable-length-argument)IllegalStateException
IOException
void write(Charset charset, Collection<? extends CharSequence> data) throws IllegalStateException, IOException
Sends a collection of string objects to the serial port/device identified by the given file descriptor.
charset
- The character set to use for encoding/decoding bytes to/from text charactersdata
- A collection of string objects (or an array) of data to be transmitted. (variable-length-argument)IllegalStateException
IOException
void write(Collection<? extends CharSequence> data) throws IllegalStateException, IOException
Sends a collection of ASCII string objects to the serial port/device identified by the given file descriptor.
data
- A collection of string objects (or an array) of data to be transmitted. (variable-length-argument)IllegalStateException
IOException
void writeln(Charset charset, CharSequence... data) throws IllegalStateException, IOException
Sends one or more string objects each appended with a line terminator (CR+LF) to the serial port/device.
charset
- The character set to use for encoding/decoding bytes to/from text charactersdata
- One or more string objects (or an array) of data to be transmitted. (variable-length-argument)IllegalStateException
IOException
void writeln(CharSequence... data) throws IllegalStateException, IOException
Sends one or more ASCII string objects each appended with a line terminator (CR+LF) to the serial port/device.
data
- One or more ASCII string objects (or an array) of data to be transmitted. (variable-length-argument)IllegalStateException
IOException
void writeln(Charset charset, Collection<? extends CharSequence> data) throws IllegalStateException, IOException
Sends a collection of string objects each appended with a line terminator (CR+LF) to the serial port/device.
charset
- The character set to use for encoding/decoding bytes to/from text charactersdata
- A collection of string objects (or an array) of data to be transmitted. (variable-length-argument)IllegalStateException
IOException
void writeln(Collection<? extends CharSequence> data) throws IllegalStateException, IOException
Sends a collection of ASCII string objects each appended with a line terminator (CR+LF) to the serial port/device.
data
- A collection of ASCII string objects (or an array) of data to be transmitted. (variable-length-argument)IllegalStateException
IOException
Copyright © 2012–2019 Pi4J. All rights reserved.