@Override
    public byte[] receive(long timeout, int byteCount) throws IOException {
        open();
        SerialPort p = getSerialPort();
        if (byteCount>0) {
            try {
                p.enableReceiveThreshold(byteCount);
            } catch (UnsupportedCommOperationException ex) {
                throw new IOException(ex);
            }
        } else {
            if (p.isReceiveThresholdEnabled()) {
                p.disableReceiveThreshold();
            }
        }
        return super.receive(timeout,byteCount);
    }