001/* 002 * Copyright 2002-2015 the original author or authors. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * https://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 017package org.springframework.web.servlet.resource; 018 019import org.springframework.core.io.Resource; 020 021/** 022 * Interface for a resource descriptor that describes the encoding 023 * applied to the entire resource content. 024 * 025 * <p>This information is required if the client consuming that resource 026 * needs additional decoding capabilities to retrieve the resource's content. 027 * 028 * @author Jeremy Grelle 029 * @since 4.1 030 * @see <a href="https://tools.ietf.org/html/rfc7231#section-3.1.2.2">HTTP/1.1: Semantics 031 * and Content, section 3.1.2.2</a> 032 */ 033public interface EncodedResource extends Resource { 034 035 /** 036 * The content coding value, as defined in the IANA registry 037 * @return the content encoding 038 * @see <a href="https://tools.ietf.org/html/rfc7231#section-3.1.2.1">HTTP/1.1: Semantics 039 * and Content, section 3.1.2.1</a> 040 */ 041 String getContentEncoding(); 042 043}