Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jboss.resteasy.cdi.decorators;
 
 

Author(s):
Ron Sigal
Version:
$Revision: 1.1 $ Copyright Nov 14, 2012
public class BookWriter implements MessageBodyWriter<Book>
   static private MessageBodyWriter<Bookdelegate;
   
   static
   {
      ..println("In BookWriter static {}");
      ResteasyProviderFactory factory = ResteasyProviderFactory.getInstance();
       = factory.getMessageBodyWriter(Book.classnullnull.);
   }
   
   public boolean isWriteable(Class<?> typeType genericTypeAnnotation[] annotationsMediaType mediaType)
   {
      ..println("entering BookWriter.isWriteable()");
      boolean b = Book.class.equals(type);
      ..println("leaving BookWriter.isWriteable()");
      return b;
   }
   public long getSize(Book tClass<?> typeType genericTypeAnnotation[] annotationsMediaType mediaType)
   {
      ..println("entering BookWriter.getSize()");
      ..println("leaving BookWriter.getSize()");
      return -1;
   }
   @Override
   public void writeTo(Book tClass<?> typeType genericType,
         Annotation[] annotationsMediaType mediaType,
         MultivaluedMap<StringObjecthttpHeadersOutputStream entityStream)
         throws IOExceptionWebApplicationException
   {
      ..println("entering BookWriter.writeTo()");
      ..println("BookWriter.writeTo() writing " + t);
      .writeTo(ttypegenericTypeannotationsmediaTypehttpHeadersentityStream);
      ..println("leaving BookWriter.writeTo()");
   }
New to GrepCode? Check out our FAQ X