public int[] getPalette() throws IOException
	{
	    BitmapsLodFile cachedBitmapsLodFile = ((MM6SpritesLodFile)getLodFile()).getCachedBitmapsLodFile();
	    if (null == cachedBitmapsLodFile)
	    {
			File thisFile = this.getLodFile().getFile();
			File paletteFile = new File(thisFile.getParent() + File.separator + "BITMAPS.LOD");
				
			RandomAccessFile paletteRandomAccessFile = new RandomAccessFile(paletteFile, "r");
			RandomAccessFileInputStream paletteInputStream = new RandomAccessFileInputStream(paletteRandomAccessFile);
			BitmapsLodFile paletteLodFile;
	        try
	        {
	            cachedBitmapsLodFile = new BitmapsLodFile(paletteFile,  paletteInputStream);
	            ((MM6SpritesLodFile)getLodFile()).setCachedBitmapsLodFile(cachedBitmapsLodFile);
	        }
	        catch (InvalidLodFileException exception)
	        {
	            IOException ioException = new IOException(exception.getMessage());
	            ioException.initCause(exception);
	            throw ioException;
	        }
	    }
	    
        long paletteNumber = getPaletteNumber();
        
	    Map cachedPaletteHashTable = ((MM6SpritesLodFile)getLodFile()).getCachedPaletteHashTable();

        int palette[] = (int [])cachedPaletteHashTable.get(new Long(paletteNumber));
        if (null != palette)  return palette;

        String paletteNumberString = String.valueOf(paletteNumber);
		while (paletteNumberString.length() < 3)  paletteNumberString = "0" + paletteNumberString;
			
		String paletteEntryName = "pal" + paletteNumberString + ".pal";
		BitmapsLodEntry paletteLodEntry = null;
        try
        {
            paletteLodEntry = (BitmapsLodEntry)cachedBitmapsLodFile.findLodEntryByFileName(paletteEntryName);
        }
        catch (NoSuchEntryException exception)
        {
            IOException ioException = new IOException(exception.getMessage());
            ioException.initCause(exception);
            throw ioException;
        }
        int paletteArray[] = new int[768];

		long startPosition = paletteLodEntry.getDataOffset();
		RandomAccessFile raf =
			paletteLodEntry
				.getLodFile()
				.getRandomAccessFileInputStream()
				.getFile();
		raf.seek(startPosition);
		for (int index = 0; index < 768; ++index)
		{
			paletteArray[index] = raf.read(); 
		}

		cachedPaletteHashTable.put(new Long(paletteNumber), paletteArray);
		
		return paletteArray;
	}