void sendByteArray(int pNumBytes, byte[] pBytes)
{

    int checksum = 0;

    sendHeader(); //send the packet header

    for(int i=0; i<pNumBytes; i++){
        outBuffer[i] = pBytes[i];
        checksum += pBytes[i];
    }

    //calculate checksum and put at end of buffer
    outBuffer[pNumBytes] = (byte)(0x100 - (byte)(checksum & 0xff));

    //send packet to remote
    if (byteOut != null) {
        try{
              byteOut.write(outBuffer, 0 /*offset*/, pNumBytes + 1);
              byteOut.flush();
        }
        catch (IOException e) {
            logSevere(e.getMessage() + " - Error: 371");
        }
    }

}//end of Remote::sendBytes