Package io.dropwizard.jersey.optional
Class OptionalIntMessageBodyWriter
java.lang.Object
io.dropwizard.jersey.optional.OptionalIntMessageBodyWriter
- All Implemented Interfaces:
jakarta.ws.rs.ext.MessageBodyWriter<OptionalInt>
@Provider
@Produces("*/*")
public class OptionalIntMessageBodyWriter
extends Object
implements jakarta.ws.rs.ext.MessageBodyWriter<OptionalInt>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonggetSize(OptionalInt 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(OptionalInt 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
-
OptionalIntMessageBodyWriter
public OptionalIntMessageBodyWriter()
-
-
Method Details
-
getSize
public long getSize(OptionalInt entity, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) - Specified by:
getSizein interfacejakarta.ws.rs.ext.MessageBodyWriter<OptionalInt>
-
isWriteable
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) - Specified by:
isWriteablein interfacejakarta.ws.rs.ext.MessageBodyWriter<OptionalInt>
-
writeTo
public void writeTo(OptionalInt 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<OptionalInt>- Throws:
IOException
-