Class WriterUtility


  • public abstract class WriterUtility
    extends java.lang.Object
    Utility for accessing RESTEasy's MessageBodyWrite setup
    Version:
    $Revision: 1 $
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String asString​(java.lang.Object toOutput, java.lang.String contentType)  
      abstract java.lang.RuntimeException createWriterNotFound​(java.lang.reflect.Type genericType, javax.ws.rs.core.MediaType mediaType)  
      void doWrite​(java.lang.Object toOutput, java.lang.Class type, java.lang.reflect.Type genericType, javax.ws.rs.core.MediaType mediaType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.Object> requestHeaders, java.io.OutputStream outputStream)  
      void doWrite​(java.lang.Object toOutput, java.lang.Class type, java.lang.reflect.Type genericType, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.Object> requestHeaders, java.io.OutputStream os)  
      void doWrite​(java.lang.Object toOutput, java.lang.Class type, javax.ws.rs.core.MediaType mediaType, java.io.OutputStream os)  
      void doWrite​(java.lang.Object toOutput, javax.ws.rs.core.MediaType mediaType, java.io.OutputStream os)  
      void doWrite​(HttpResponse response, java.lang.Object toOutput, java.lang.Class type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)  
      static byte[] getBytes​(java.lang.Object toOutput, java.lang.String contentType)  
      static void write​(java.lang.Object toOutput, javax.ws.rs.core.MediaType mt, java.io.OutputStream os)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • interceptors

        private javax.ws.rs.ext.WriterInterceptor[] interceptors
    • Constructor Detail

      • WriterUtility

        public WriterUtility()
      • WriterUtility

        public WriterUtility​(ResteasyProviderFactory factory,
                             javax.ws.rs.ext.WriterInterceptor[] interceptors)
    • Method Detail

      • asString

        public static java.lang.String asString​(java.lang.Object toOutput,
                                                java.lang.String contentType)
                                         throws java.io.IOException
        Throws:
        java.io.IOException
      • getBytes

        public static byte[] getBytes​(java.lang.Object toOutput,
                                      java.lang.String contentType)
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • write

        public static void write​(java.lang.Object toOutput,
                                 javax.ws.rs.core.MediaType mt,
                                 java.io.OutputStream os)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • doWrite

        public void doWrite​(java.lang.Object toOutput,
                            javax.ws.rs.core.MediaType mediaType,
                            java.io.OutputStream os)
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • doWrite

        public void doWrite​(java.lang.Object toOutput,
                            java.lang.Class type,
                            javax.ws.rs.core.MediaType mediaType,
                            java.io.OutputStream os)
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • doWrite

        public void doWrite​(java.lang.Object toOutput,
                            java.lang.Class type,
                            java.lang.reflect.Type genericType,
                            javax.ws.rs.core.MediaType mediaType,
                            javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.Object> requestHeaders,
                            java.io.OutputStream os)
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • doWrite

        public void doWrite​(HttpResponse response,
                            java.lang.Object toOutput,
                            java.lang.Class type,
                            java.lang.reflect.Type genericType,
                            java.lang.annotation.Annotation[] annotations,
                            javax.ws.rs.core.MediaType mediaType)
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • doWrite

        public void doWrite​(java.lang.Object toOutput,
                            java.lang.Class type,
                            java.lang.reflect.Type genericType,
                            javax.ws.rs.core.MediaType mediaType,
                            java.lang.annotation.Annotation[] annotations,
                            javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.Object> requestHeaders,
                            java.io.OutputStream outputStream)
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • createWriterNotFound

        public abstract java.lang.RuntimeException createWriterNotFound​(java.lang.reflect.Type genericType,
                                                                        javax.ws.rs.core.MediaType mediaType)