class IntegratedNetworkResponseParser implements NetworkResponseParser {

	@Override
	public <T> Response<T> parseNetworkResponse(NetworkResponse response, Class<T> clazz) {
		Assert.notNull(response, "NetworkResponse");
		Assert.notNull(clazz, "Target class token");

		// Skip parsing if target class is {@code Void}
		if (clazz == Void.class) {
			return Response.success(null, null);
		}

		// Use StringNetworkResponseParser if target class is String
		if (clazz == String.class) {
			return STRING_NETWORK_RESPONSE_PARSER.parseNetworkResponse(response, clazz);
		}

		// Return the response without using any other parser if target class is NetworkResponse
		if (clazz == NetworkResponse.class) {
			@SuppressWarnings("unchecked")
			Response<T> successResponse = (Response<T>) Response.success(response, HttpHeaderParser.parseCacheHeaders(response));
			return successResponse;
		}

		// Get a content type string from the response header
		String contentTypeString = getResponseHeader(response, CONTENT_TYPE_HEADER_KEY);
		// Throw an error if content type is null
		if (contentTypeString == null) {
			return Response.error(new ParseError(new UnsupportedContentTypeException("It cannot find any response parser, "
					+ "because the response content type is null.")));
		}

		// Create a content type instance
		ContentType contentType = ContentType.createContentType(contentTypeString);
		// Get a network response parser from parsers collection
		NetworkResponseParser responseParser = parsers.get(contentType);
		// Throw an error if it cannot find any response parser
		if (responseParser == null) {
			return Response.error(new ParseError(new UnsupportedContentTypeException("It cannot find any response parser "
					+ "for the response content type.")));	
		}

		// Parse the response and return it
		return responseParser.parseNetworkResponse(response, clazz);
	}

	  IntegratedNetworkResponseParser(Map<ContentType, NetworkResponseParser> parsers);

}