Putting a signed integer into external EEPROM

Hi guys, so for my project since I need quite a bit of memory I'm placing my data into an external EEPROM, I have everything set up fine using example code from http://www.hobbytronics.co.uk/arduino-external-eeprom which is great but I want to place a Unix Epoch value into the EEPROM and I don't think it will fit with the code from that site and I think the largest value I get is 256. I've been trying to use the example code from here Arduino Playground - EEPROMReadWriteLong but since I'm using an external EEPROM with I2C I think it is? It uses Wire.write instead of EEPROM write, and I'm unsure if its okay for me to send 4 writes in a row or whether I can just change those EEPROM writes to wirewrites. I don't really understand the whole shifting bit either which makes it sort of difficult as well.

If it helps I'm using the 24lc256 EEPROM

It's that easy, use the Wire.write()s to your EEPROM instead of the EEPROM.write() you see in the playground article. You can eliminate some code if you do a sequential write:

void writeEEPROM(int deviceaddress, unsigned int eeaddress, uint32_t data ) 
{
  Wire.beginTransmission(deviceaddress);
  Wire.write((int)(eeaddress >> 8));   // MSB
  Wire.write((int)(eeaddress & 0xFF)); // LSB
  Wire.write(data & 0xff);
  Wire.write((data >> 8) & 0xff);
  Wire.write((data >> 16) & 0xff);
  Wire.write((data >> 24) & 0xff);
  Wire.endTransmission();
}

or a bit faster:

void writeEEPROM(int deviceaddress, unsigned int eeaddress, uint32_t data ) 
{
  Wire.beginTransmission(deviceaddress);
  Wire.write((int)(eeaddress >> 8));   // MSB
  Wire.write((int)(eeaddress & 0xFF)); // LSB
  uint i;
  for (i = 0; i < 4; i++) {
    Wire.write(data & 0xff);
    data >>= 8;
  }
  Wire.endTransmission();
}

Thanks heaps mate, that helped me out a lot, especially since i had some code to look at as well, I'm trying to get the reading part done too but I seem to be having a bit of problems with that as well. I attempted the following code:

long EEPROMReadlong(int deviceaddress, unsigned int address )
{
  Wire.beginTransmission(deviceaddress);
  Wire.write((int)(address >> 8));   // MSB
  Wire.write((int)(address & 0xFF)); // LSB

  //Read the 4 bytes from the eeprom memory.
  long four = Wire.read(address);
  long three = Wire.read(address + 1);
  long two = Wire.read(address + 2);
  long one = Wire.read(address + 3);

  //Return the recomposed long by using bitshift.
  return ((four << 0) & 0xFF) + ((three << 8) & 0xFFFF) + ((two << 16) & 0xFFFFFF) + ((one << 24) & 0xFFFFFFFF);
}

Which is pretty much just changing the eeprom.read to wire.read() but I keep getting an error saying that no matching function call to TwoWire::Read(unsinged int&). I'm assuming it has something to do with the unsigned int address but since I used that in the write I don't quite understand why it doesn't work here?

Also if I write to address 1 in the code from what I understand it writes the long over address 1, 2, 3 and 4 right? So If I wanted to store another long value, I should place it at address 5 right? and not at 2 since then it will rewrite over 2, 3, 4 and also write 5?

----------edit--
Okay so I had another go at it with the following reading code:

long EEPROMReadlong(int deviceaddress, unsigned int address )
{
  long four, three, two, one;
  Wire.beginTransmission(deviceaddress);
  Wire.write((int)(address >> 8));   // MSB
  Wire.write((int)(address & 0xFF)); // LSB

  //Read the 4 bytes from the eeprom memory.
  Wire.requestFrom(deviceaddress, address);
  if (Wire.available()) four = Wire.read();

  Wire.requestFrom(deviceaddress, (address + 1));
  if (Wire.available()) {
    three = Wire.read();
  }
  Wire.requestFrom(deviceaddress, (address + 2));
  if (Wire.available()) {
    two = Wire.read();
  }
  Wire.requestFrom(deviceaddress, (address + 3));
  if (Wire.available()) {
    one = Wire.read();
  }
  //Return the recomposed long by using bitshift.
  return ((four << 0) & 0xFF) + ((three << 8) & 0xFFFF) + ((two << 16) & 0xFFFFFF) + ((one << 24) & 0xFFFFFFFF);
}

But unfortunately it doesn't print anything on the screen when I call

void setup()
{
  Wire.begin(); 
  Serial.begin(57600); 
  Serial.print("init");
  delay(5000);
  for (int i = 0; i < 10000; i += 4)
  {
    Serial.println(EEPROMReadlong(disk1, i));
    delay(10);
  }
}

You haven't understood, how I2C works. Try this version:

long EEPROMReadlong(int deviceaddress, unsigned int address )
{
  long four, three, two, one;
  Wire.beginTransmission(deviceaddress);
  Wire.write((int)(address >> 8));   // MSB
  Wire.write((int)(address & 0xFF)); // LSB
  if (Wire.endTransmission()) return -1;

  //Read the 4 bytes from the eeprom memory.
  if (Wire.requestFrom(deviceaddress, 4) == 4) {
    uint8_t i;
    uint32_t v = 0;
    for (i = 0; i < 4; i++) {
      uint32_t r = Wire.read();
      v |= r << ((3-i) * 8);
    }
    return v;
  } else {
    return -1;
  }
}