Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT

## javax.ws.rs
Annotation Type Consumes

    @Inherited
    @Target(value={TYPE,METHOD})
    @Retention(value=RUNTIME)
    public @interface Consumes

Defines the media types that the methods of a resource class or `MessageBodyReader` can accept. If not specified, a container will assume that any media type is acceptable. Method level annotations override a class level annotation. A container is responsible for ensuring that the method invoked is capable of consuming the media type of the HTTP request entity body. If no such method is available the container must respond with a HTTP "415 Unsupported Media Type" as specified by RFC 2616.

See Also:
  `MessageBodyReader`

Optional Element Summary
`java.lang.String[]` | `value` A list of media types.

### value

    public abstract java.lang.String[] value

  A list of media types. Each entry may specify a single type or consist of a comma separated list of types. E.g. {"image/jpeg,image/gif", "image/png"}. Use of the comma-separated form allows definition of a common string constant for use on multiple targets.

  Default:
    "*/*"

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT

Copyright © 2009 Sun Microsystems, Inc. All Rights Reserved.