private void initDataLayout(File file) throws IOException, RrdException {
if (file.exists()) { // Load the data formats from the file
int bytes = ras.read(buffer, 0, 24);
if (bytes < 24) {
throw new RrdException("Invalid RRD file");
}
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 RrdException("Invalid RRD file");
}
switch (index) {
case 12: