Time Stamping data on an Arduino and reading it on a Java IDE
There's a number of fundamentally wrong things in your sketch.

static char buffer[1]; // a variable to hold both sensor data


No - that has room for 1 entry - hence the 1. 1 means 1, not 2.

buffer[1] = newByte;


No. There is no buffer[1]. You count slices from 0.  buffer[0] exists (the first one) but buffer[1] doesn't.

buffer[0] = millis;


You aren't calling the function, you are assigning the address of the function. And worse than that, buffer is an array of 8-bit values - neither the address of the function, nor the return value from the function (if you were to fix that) would fit in that space - since the return value is an unsigned long which is 4 bytes in size.

You need to have at least 5 bytes in your array - four for the time stamp and one for the value you read from serial. Then you place them in to the array in the order you see fit, and read them back in the same order in Java.