@Override
        public int read(ByteBuf buf) {
            int bytesToRead = comPort.bytesAvailable();
            assert bytesToRead > 0;
            byte[] buffer = new byte[bytesToRead];
            comPort.readBytes(buffer, bytesToRead);
            buf.writeBytes(buffer);
            return bytesToRead;
        }
@return Number of bytes written to wire
plc4j/transports/serial/src/main/java/org/apache/plc4x/java/transport/serial/SerialChannelHandler.java