mirror of
https://github.com/processing/processing4.git
synced 2026-02-13 18:35:37 +01:00
Add missing readStringUntil() method
This commit is contained in:
@@ -349,6 +349,16 @@ public class Serial implements SerialPortEventListener {
|
||||
}
|
||||
|
||||
|
||||
public String readStringUntil(int inByte) {
|
||||
byte temp[] = readBytesUntil(inByte);
|
||||
if (temp == null) {
|
||||
return null;
|
||||
} else {
|
||||
return new String(temp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void serialEvent(SerialPortEvent event) {
|
||||
if (event.getEventType() == SerialPortEvent.RXCHAR) {
|
||||
int toRead;
|
||||
|
||||
Reference in New Issue
Block a user