org.glassfish.jersey.message.internal
Class FileProvider
java.lang.Object
org.glassfish.jersey.message.internal.AbstractMessageReaderWriterProvider<File>
org.glassfish.jersey.message.internal.FileProvider
- All Implemented Interfaces:
- MessageBodyReader<File>, MessageBodyWriter<File>
@Singleton
public final class FileProvider
- extends AbstractMessageReaderWriterProvider<File>
Provider for marshalling/un-marshalling of application/octet-stream
entity type to/from a File instance.
- Author:
- Paul Sandoz, Marek Potociar (marek.potociar at oracle.com)
|
Method Summary |
long |
getSize(File 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)
|
File |
readFrom(Class<File> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType,
MultivaluedMap<String,String> httpHeaders,
InputStream entityStream)
|
void |
writeTo(File 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 |
FileProvider
public FileProvider()
isReadable
public boolean isReadable(Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType)
readFrom
public File readFrom(Class<File> 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(File t,
Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType,
MultivaluedMap<String,Object> httpHeaders,
OutputStream entityStream)
throws IOException
- Throws:
IOException
getSize
public long getSize(File t,
Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType)
- Specified by:
getSize in interface MessageBodyWriter<File>- Overrides:
getSize in class AbstractMessageReaderWriterProvider<File>
Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.