Arduino to a SPI RFID reader

Hello, I have difficulty communicating a SPI RFID reader with Arduino.

In order to make the reader work, every time I need to send a command consisting of several bytes of data, e.g. CC 02 01 03. The returned message should look like BB 08 01 48 59 35 30 32 42 6F.

I looked through the SPI library in Arduino.cc. The major function is spi.transfer(). However, it sends 1 byte of data and reads back 1 byte of data every time. It may be ok to send the data by calling transfer() several times, e.g.

spi.transfer(CC);
spi.transfer(02);
spi.transfer(01);
spi.transfer(03);

But how can the arduino read back the returned message? For different command, the number of bytes of the returned message is also different.

Thanks a lot for your help.

it sends 1 byte of data and reads back 1 byte of data every time

No just keep on sending it as many bytes as you need, then keep on reading as many bytes as it sends.
These are two routines I use to read and write to a 23S17 port expander. You will see on the read, I write two bytes to it and read back one. On the write I just write three bytes.

byte expanderR(byte com,byte add) //// expander read
{
  byte value;
  digitalWrite(SS_PIN, LOW);
  Spi.transfer(com);  // address read
  Spi.transfer(add);   //  register address
  value = Spi.transfer(0x0);   //  dummy data for read
  digitalWrite(SS_PIN, HIGH);
  return value;
}

byte expanderW(byte com, byte add, byte dat) // expander write
{
  digitalWrite(SS_PIN, LOW);
  Spi.transfer(com);  // address write
  Spi.transfer(add);   //  register address
  Spi.transfer(dat);   //  register data
  digitalWrite(SS_PIN, HIGH);
}