Info(BEDictionary dict) throws MetaInfoException, InvalidBEncodingException, UnsupportedEncodingException, NullHashException {
		mDictionary = dict;

		// ----- Required Keys -----------------------------------------------
		if (mDictionary.contains(KEY_PIECE_LENGTH))
			mPieceLength = mDictionary.getInt(KEY_PIECE_LENGTH);
		else
			throw new MetaInfoRequiredKeyException(KEY_PIECE_LENGTH);
		
		if (mDictionary.contains(KEY_PIECES))
			parsePieces();
		else
			throw new MetaInfoRequiredKeyException(KEY_PIECES);

		if (mDictionary.contains(KEY_NAME))
			mName = mDictionary.getString(KEY_NAME);
		else
			throw new MetaInfoRequiredKeyException(KEY_NAME);
		// -------------------------------------------------------------------

		// Optional Key
		if (mDictionary.contains(KEY_PRIVATE))
			mPrivate = mDictionary.getInt(KEY_PRIVATE) == 1; // if (private == 1) => It is a Private Torrent.
		
		// With one or several files, we stock them in an ArrayList.
		mFiles = new ArrayList<TorrentFile>();
		
		// the Key Files is there only for multi-files mode.
		if (mDictionary.contains(KEY_FILES))
			parseMultFile();
		else
			parseSingleFile();
		
		mLength = 0;
		for (TorrentFile file: mFiles) {
			mLength += file.length();
		}
	}