public SerialIO(String portName,byte[] dataBegin,byte[] dataEnd){
  this.portName=portName;
  this.dataBegin=Arrays.copyOf(dataBegin,dataBegin.length);
  this.dataEnd=Arrays.copyOf(dataEnd,dataEnd.length);
}

public SerialIO ( String portName , byte [ ] dataBegin , byte [ ] dataEnd ) { this . portName = portName ; this . dataBegin = Arrays . copyOf ( dataBegin , dataBegin . length ) ; this . dataEnd = Arrays . copyOf ( dataEnd , dataEnd . length ) ; }
controller for serial communication .
