Extra bytes in binary serial communications

I'm using bluetooth to communicate in binary with my Android phone. It's working fine, expect I always get some extra bytes!
My Java Android code is:

    	byte[] data = new byte [6];
    	data[0] = (byte) 0x01;
    	data[1] = (byte) 0x02;
    	data[2] = (byte) 0x03;
    	data[3] = (byte) 0x04;
    	data[4] = (byte) 0x05;
    	data[5] = (byte) 0x06;
        mmOutputStream.write(data);

And my arduino is:

if(bluetooth.available()) {
    char buffer[6];
    bluetooth.readBytes(buffer,6);
    Serial.write(buffer);
  }

But my output is:

01 02 03 04 05 06 D4 3C 05 01 A2 07 16 01 5E

Any ideas why I am getting these extra bytes?! It seems to be completely random, sometimes I get them, sometimes I don't. It's driving me nuts! I'm using the SoftwareSerial library for the bluetooth, and the normal h/w one for the serial.write.

Your Serial.write(buffer) will send until it reaches a zero terminator. You do not allow for that, so sometimes there will be extra characters. Try this Serial.write() call. It sends only the 6 characters.

    Serial.write(buffer,6);

Or make the buffer array 7 characters and put a zero in buffer[6].

You should also see if the droid is doing the same with that array. This may send until it reaches a zero terminator, and you have not allowed for one in the data array.

    mmOutputStream.write(data);

Oh man if that's it I owe you a drink! Problem now, the line:

char buffer[6];
...
Serial.write(buffer,6);

Returns:

main.cpp:50: error: invalid conversion from 'char*' to 'const uint8_t*'
main.cpp:50: error:   initializing argument 1 of 'virtual size_t Print::write(const uint8_t*, size_t)'

Ideas?!