Resteasy YAML Provider 2.3.6.Final-redhat-1

org.jboss.resteasy.plugins.providers
Class YamlProvider

java.lang.Object
  extended by org.jboss.resteasy.plugins.providers.AbstractEntityProvider<Object>
      extended by org.jboss.resteasy.plugins.providers.YamlProvider
All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader<Object>, javax.ws.rs.ext.MessageBodyWriter<Object>

@Provider
public class YamlProvider
extends AbstractEntityProvider<Object>

Provider for YAML <-> Object marshalling. Uses the following mime types:


   text/yaml
   text/x-yaml
   application/x-yaml

Author:
Martin Algesten

Constructor Summary
YamlProvider()
           
 
Method Summary
 boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
protected  boolean isValidType(Class type)
           
 boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 Object readFrom(Class<Object> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders, InputStream entityStream)
           
 void writeTo(Object t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream)
           
 
Methods inherited from class org.jboss.resteasy.plugins.providers.AbstractEntityProvider
getSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

YamlProvider

public YamlProvider()
Method Detail

isReadable

public boolean isReadable(Class<?> type,
                          Type genericType,
                          Annotation[] annotations,
                          javax.ws.rs.core.MediaType mediaType)

readFrom

public Object readFrom(Class<Object> type,
                       Type genericType,
                       Annotation[] annotations,
                       javax.ws.rs.core.MediaType mediaType,
                       javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders,
                       InputStream entityStream)
                throws IOException,
                       javax.ws.rs.WebApplicationException
Throws:
IOException
javax.ws.rs.WebApplicationException

isValidType

protected boolean isValidType(Class type)

isWriteable

public boolean isWriteable(Class<?> type,
                           Type genericType,
                           Annotation[] annotations,
                           javax.ws.rs.core.MediaType mediaType)

writeTo

public void writeTo(Object t,
                    Class<?> type,
                    Type genericType,
                    Annotation[] annotations,
                    javax.ws.rs.core.MediaType mediaType,
                    javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders,
                    OutputStream entityStream)
             throws IOException,
                    javax.ws.rs.WebApplicationException
Throws:
IOException
javax.ws.rs.WebApplicationException

Resteasy YAML Provider 2.3.6.Final-redhat-1

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.