org.glassfish.jersey.message.internal
Class ByteArrayProvider
java.lang.Object
org.glassfish.jersey.message.internal.AbstractMessageReaderWriterProvider<byte[]>
org.glassfish.jersey.message.internal.ByteArrayProvider
- All Implemented Interfaces:
- MessageBodyReader<byte[]>, MessageBodyWriter<byte[]>
public final class ByteArrayProvider
- extends AbstractMessageReaderWriterProvider<byte[]>
Default Jersey byte array entity provider (reader and writer).
- Author:
- Paul Sandoz, Marek Potociar (marek.potociar at oracle.com)
|
Method Summary |
long |
getSize(byte[] t,
Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType)
|
boolean |
isReadable(Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType)
|
boolean |
isWriteable(Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType)
|
byte[] |
readFrom(Class<byte[]> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType,
MultivaluedMap<String,String> httpHeaders,
InputStream entityStream)
|
void |
writeTo(byte[] t,
Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType,
MultivaluedMap<String,Object> httpHeaders,
OutputStream entityStream)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ByteArrayProvider
public ByteArrayProvider()
isReadable
public boolean isReadable(Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType)
readFrom
public byte[] readFrom(Class<byte[]> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType,
MultivaluedMap<String,String> httpHeaders,
InputStream entityStream)
throws IOException
- Throws:
IOException
isWriteable
public boolean isWriteable(Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType)
writeTo
public void writeTo(byte[] t,
Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType,
MultivaluedMap<String,Object> httpHeaders,
OutputStream entityStream)
throws IOException
- Throws:
IOException
getSize
public long getSize(byte[] t,
Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType)
- Specified by:
getSize in interface MessageBodyWriter<byte[]>- Overrides:
getSize in class AbstractMessageReaderWriterProvider<byte[]>
Copyright © 2007-2013 Oracle Corporation. All Rights Reserved. Use is subject to license terms.