private void initDataLayout(File file) throws IOException {

		if (file.exists()) {    // Load the data formats from the file
			ras.read(buffer, 0, 24);

			int index;

			if ((index = indexOf(FLOAT_COOKIE_BIG_ENDIAN, buffer)) != -1) {
				bigEndian = true;
			} else if ((index = indexOf(FLOAT_COOKIE_LITTLE_ENDIAN, buffer))
					!= -1) {
				bigEndian = false;
			} else {
				throw new IOException("Invalid RRD file");
			}

			switch (index) {

				case 12:
					alignment = 4;
					break;

				case 16:
					alignment = 8;
					break;

				default :
					throw new RuntimeException("Unsupported architecture");
			}
		} else {                // Default to data formats for this hardware architecture
		}

		ras.seek(0);    // Reset file pointer to start of file
	}