IOException,
MissingParameterException
{
if (tileIndex < 0)
{
throw new MissingParameterException("Tile index was not initialized.");
}
if (codec == null)
{
throw new MissingParameterException("No TIFFCodec object was given to this decoder.");
}
if (ifd == null)
{
throw new MissingParameterException("No TIFFImageFileDirectory object was given to this decoder.");
}
RandomAccessFile raf = codec.getRandomAccessFile();
long offset = ifd.getTileOffset(tileIndex) & 0x00000000ffffffffL;
raf.seek(offset);