Class DefaultTextPlainBodyHandler

  • All Implemented Interfaces:
    javax.ws.rs.ext.MessageBodyReader<Object>

    public abstract class DefaultTextPlainBodyHandler
    extends Object
    implements javax.ws.rs.ext.MessageBodyReader<Object>
    Version:
    $Revision: 1 $ TODO: Reevaluate this as it depends on a lot of reflection for reading Java types. It should not be difficult to write handlers for these cases...
    Author:
    Bill Burke
    • Constructor Detail

      • DefaultTextPlainBodyHandler

        public DefaultTextPlainBodyHandler()
    • Method Detail

      • isReadable

        public boolean isReadable​(Class type,
                                  Type genericType,
                                  Annotation[] annotations,
                                  javax.ws.rs.core.MediaType mediaType)
        Specified by:
        isReadable in interface javax.ws.rs.ext.MessageBodyReader<Object>
      • readFrom

        public Object readFrom​(Class type,
                               Type genericType,
                               Annotation[] annotations,
                               javax.ws.rs.core.MediaType mediaType,
                               javax.ws.rs.core.MultivaluedMap httpHeaders,
                               InputStream entityStream)
                        throws IOException,
                               javax.ws.rs.WebApplicationException
        Specified by:
        readFrom in interface javax.ws.rs.ext.MessageBodyReader<Object>
        Throws:
        IOException
        javax.ws.rs.WebApplicationException
      • validateInput

        protected abstract void validateInput​(String input)
                                       throws javax.ws.rs.ProcessingException
        Throws:
        javax.ws.rs.ProcessingException