Class ByteArrayProvider
- java.lang.Object
-
- org.jboss.resteasy.plugins.providers.ByteArrayProvider
-
- All Implemented Interfaces:
jakarta.ws.rs.ext.MessageBodyReader<byte[]>,jakarta.ws.rs.ext.MessageBodyWriter<byte[]>,AsyncMessageBodyWriter<byte[]>
@Provider @Produces("*/*") @Consumes("*/*") public class ByteArrayProvider extends Object implements jakarta.ws.rs.ext.MessageBodyReader<byte[]>, AsyncMessageBodyWriter<byte[]>- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Constructor Summary
Constructors Constructor Description ByteArrayProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletionStage<Void>asyncWriteTo(byte[] bytes, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, AsyncOutputStream entityStream)longgetSize(byte[] bytes, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType)booleanisReadable(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)byte[]readFrom(Class<byte[]> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String,String> httpHeaders, InputStream entityStream)voidwriteTo(byte[] bytes, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream)
-
-
-
Method Detail
-
isReadable
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType)
- Specified by:
isReadablein interfacejakarta.ws.rs.ext.MessageBodyReader<byte[]>
-
readFrom
public byte[] readFrom(Class<byte[]> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String,String> httpHeaders, InputStream entityStream) throws IOException
- Specified by:
readFromin interfacejakarta.ws.rs.ext.MessageBodyReader<byte[]>- Throws:
IOException
-
isWriteable
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType)
- Specified by:
isWriteablein interfacejakarta.ws.rs.ext.MessageBodyWriter<byte[]>
-
getSize
public long getSize(byte[] bytes, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType)- Specified by:
getSizein interfacejakarta.ws.rs.ext.MessageBodyWriter<byte[]>
-
writeTo
public void writeTo(byte[] bytes, 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<byte[]>- Throws:
IOException
-
asyncWriteTo
public CompletionStage<Void> asyncWriteTo(byte[] bytes, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, AsyncOutputStream entityStream)
- Specified by:
asyncWriteToin interfaceAsyncMessageBodyWriter<byte[]>
-
-