@Produces(value="*/*") @Consumes(value="*/*") public class ByteArrayProvider extends Object implements javax.ws.rs.ext.MessageBodyReader<byte[]>, javax.ws.rs.ext.MessageBodyWriter<byte[]>
Constructor and Description |
---|
ByteArrayProvider() |
Modifier and Type | Method and Description |
---|---|
long |
getSize(byte[] bytes,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
boolean |
isReadable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
boolean |
isWriteable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
byte[] |
readFrom(Class<byte[]> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders,
InputStream entityStream) |
void |
writeTo(byte[] bytes,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders,
OutputStream entityStream) |
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
isReadable
in interface javax.ws.rs.ext.MessageBodyReader<byte[]>
public byte[] readFrom(Class<byte[]> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders, InputStream entityStream) throws IOException
readFrom
in interface javax.ws.rs.ext.MessageBodyReader<byte[]>
IOException
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
isWriteable
in interface javax.ws.rs.ext.MessageBodyWriter<byte[]>
public long getSize(byte[] bytes, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
getSize
in interface javax.ws.rs.ext.MessageBodyWriter<byte[]>
public void writeTo(byte[] bytes, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream) throws IOException
writeTo
in interface javax.ws.rs.ext.MessageBodyWriter<byte[]>
IOException
Copyright © 2018 JBoss by Red Hat. All rights reserved.