Package io.dropwizard.jersey.optional
Class OptionalLongMessageBodyWriter
java.lang.Object
io.dropwizard.jersey.optional.OptionalLongMessageBodyWriter
- All Implemented Interfaces:
jakarta.ws.rs.ext.MessageBodyWriter<OptionalLong>
@Provider
@Produces("*/*")
public class OptionalLongMessageBodyWriter
extends Object
implements jakarta.ws.rs.ext.MessageBodyWriter<OptionalLong>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonggetSize(OptionalLong entity, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) booleanisWriteable(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) voidwriteTo(OptionalLong entity, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream)
-
Constructor Details
-
OptionalLongMessageBodyWriter
public OptionalLongMessageBodyWriter()
-
-
Method Details
-
getSize
public long getSize(OptionalLong entity, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) - Specified by:
getSizein interfacejakarta.ws.rs.ext.MessageBodyWriter<OptionalLong>
-
isWriteable
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) - Specified by:
isWriteablein interfacejakarta.ws.rs.ext.MessageBodyWriter<OptionalLong>
-
writeTo
public void writeTo(OptionalLong entity, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) throws IOException- Specified by:
writeToin interfacejakarta.ws.rs.ext.MessageBodyWriter<OptionalLong>- Throws:
IOException
-