public function getExtensionByType($type)
    {
        if ($this->isValidType($type)) {
            return $this->mime[$type];
        } else {
            throw new RuntimeException(sprintf('Invalid type "%s" supplied', $type));
        }
    }