org.trialox.jaxrs.providers.provided
Class AbstractMessageReaderWriterProvider<T>
java.lang.Object
org.trialox.jaxrs.providers.provided.AbstractMessageReaderWriterProvider<T>
- All Implemented Interfaces:
- java.lang.Comparable, javax.ws.rs.ext.MessageBodyReader<T>, javax.ws.rs.ext.MessageBodyWriter<T>
- Direct Known Subclasses:
- ByteArrayProvider, FileProvider, FormMultivaluedMapProvider, InputStreamProvider, ReaderProvider
public abstract class AbstractMessageReaderWriterProvider<T>
- extends java.lang.Object
- implements javax.ws.rs.ext.MessageBodyReader<T>, javax.ws.rs.ext.MessageBodyWriter<T>, java.lang.Comparable
- Author:
- szalay
|
Field Summary |
static java.nio.charset.Charset |
UTF8
|
|
Method Summary |
static java.nio.charset.Charset |
getCharset(javax.ws.rs.core.MediaType m)
|
static java.nio.charset.Charset |
getCharset(javax.ws.rs.core.MediaType m,
java.nio.charset.Charset def)
|
long |
getSize(T t)
|
static java.lang.String |
readFromAsString(java.io.InputStream in,
javax.ws.rs.core.MediaType type)
|
static void |
writeTo(java.io.InputStream in,
java.io.OutputStream out)
|
static void |
writeTo(java.io.Reader in,
java.io.Writer out)
|
static void |
writeToAsString(java.lang.String s,
java.io.OutputStream out,
javax.ws.rs.core.MediaType type)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.ws.rs.ext.MessageBodyReader |
isReadable, readFrom |
| Methods inherited from interface javax.ws.rs.ext.MessageBodyWriter |
isWriteable, writeTo |
| Methods inherited from interface java.lang.Comparable |
compareTo |
UTF8
public static final java.nio.charset.Charset UTF8
AbstractMessageReaderWriterProvider
public AbstractMessageReaderWriterProvider()
getCharset
public static final java.nio.charset.Charset getCharset(javax.ws.rs.core.MediaType m)
getCharset
public static final java.nio.charset.Charset getCharset(javax.ws.rs.core.MediaType m,
java.nio.charset.Charset def)
writeTo
public static final void writeTo(java.io.InputStream in,
java.io.OutputStream out)
throws java.io.IOException
- Throws:
java.io.IOException
writeTo
public static final void writeTo(java.io.Reader in,
java.io.Writer out)
throws java.io.IOException
- Throws:
java.io.IOException
readFromAsString
public static final java.lang.String readFromAsString(java.io.InputStream in,
javax.ws.rs.core.MediaType type)
throws java.io.IOException
- Throws:
java.io.IOException
writeToAsString
public static final void writeToAsString(java.lang.String s,
java.io.OutputStream out,
javax.ws.rs.core.MediaType type)
throws java.io.IOException
- Throws:
java.io.IOException
getSize
public long getSize(T t)
- Specified by:
getSize in interface javax.ws.rs.ext.MessageBodyWriter<T>
Copyright © 2008. All Rights Reserved.