org.glassfish.jersey.server
Class ChunkedResponseWriter

java.lang.Object
  extended by org.glassfish.jersey.server.ChunkedResponseWriter
All Implemented Interfaces:
MessageBodyWriter<ChunkedResponse<?>>

@Provider
public class ChunkedResponseWriter
extends java.lang.Object
implements MessageBodyWriter<ChunkedResponse<?>>

Used for writing ChunkedResponse.

Author:
Pavel Bucek (pavel.bucek at oracle.com)
See Also:
MessageBodyWriter

Constructor Summary
ChunkedResponseWriter(org.glassfish.hk2.Services services)
          Constructor.
 
Method Summary
 long getSize(ChunkedResponse<?> chunkedResponse, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, MediaType mediaType)
           
 boolean isWriteable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, MediaType mediaType)
           
 void writeTo(ChunkedResponse<?> chunkedResponse, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, MediaType mediaType, MultivaluedMap<java.lang.String,java.lang.Object> httpHeaders, java.io.OutputStream entityStream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChunkedResponseWriter

public ChunkedResponseWriter(org.glassfish.hk2.Services services)
Constructor.

Parameters:
services - injected Services instance. Used for obtaining MessageBodyWorkers.
Method Detail

isWriteable

public boolean isWriteable(java.lang.Class<?> type,
                           java.lang.reflect.Type genericType,
                           java.lang.annotation.Annotation[] annotations,
                           MediaType mediaType)
Specified by:
isWriteable in interface MessageBodyWriter<ChunkedResponse<?>>

getSize

public long getSize(ChunkedResponse<?> chunkedResponse,
                    java.lang.Class<?> type,
                    java.lang.reflect.Type genericType,
                    java.lang.annotation.Annotation[] annotations,
                    MediaType mediaType)
Specified by:
getSize in interface MessageBodyWriter<ChunkedResponse<?>>

writeTo

public void writeTo(ChunkedResponse<?> chunkedResponse,
                    java.lang.Class<?> type,
                    java.lang.reflect.Type genericType,
                    java.lang.annotation.Annotation[] annotations,
                    MediaType mediaType,
                    MultivaluedMap<java.lang.String,java.lang.Object> httpHeaders,
                    java.io.OutputStream entityStream)
             throws java.io.IOException,
                    WebApplicationException
Specified by:
writeTo in interface MessageBodyWriter<ChunkedResponse<?>>
Throws:
java.io.IOException
WebApplicationException


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.
OSZAR »