MCPcopy
hub / github.com/arduino/Arduino / resetDecoding

Method resetDecoding

arduino-core/src/processing/app/Serial.java:297–302  ·  view source on GitHub ↗

Reset the encoding used to convert the bytes coming in before they are handed as Strings to {@Link #message(char[], int)}.

(Charset charset)

Source from the content-addressed store, hash-verified

295 * before they are handed as Strings to {@Link #message(char[], int)}.
296 */
297 public synchronized void resetDecoding(Charset charset) {
298 bytesToStrings = charset.newDecoder()
299 .onMalformedInput(CodingErrorAction.REPLACE)
300 .onUnmappableCharacter(CodingErrorAction.REPLACE)
301 .replaceWith("\u2e2e");
302 }
303
304 static public List<String> list() {
305 return Arrays.asList(SerialPortList.getPortNames());

Callers 1

SerialMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected