Class ProviderHelper
- java.lang.Object
- 
- org.jboss.resteasy.plugins.providers.ProviderHelper
 
- 
 public final class ProviderHelper extends Object A utility class to provide supporting functionality to various entity providers.- Version:
- $Revision: $
- Author:
- Ryan J. McDonough
 
- 
- 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static intasyncRead(InputStream in, byte[] buf)static intasyncRead(InputStream in, byte[] buf, int offset, int length)static CompletionStage<Void>completedException(Throwable t)static List<javax.ws.rs.core.MediaType>getAvailableMediaTypes(String[] mediaTypes)static List<javax.ws.rs.core.Variant>getAvailableVariants(String[] mediaTypes)static List<javax.ws.rs.core.Variant>getAvailableVariants(List<javax.ws.rs.core.MediaType> mediaTypes)static StringreadString(InputStream in)static StringreadString(InputStream in, javax.ws.rs.core.MediaType mediaType)static voidwriteTo(InputStream in, OutputStream out)static CompletionStage<Void>writeTo(InputStream in, AsyncOutputStream out)static CompletionStage<Void>writeToAndCloseInput(InputStream in, AsyncOutputStream out)
 
- 
- 
- 
Method Detail- 
readStringpublic static String readString(InputStream in) throws IOException - Parameters:
- in- input stream
- Returns:
- string data
- Throws:
- IOException- if I/O error occurred
 
 - 
readStringpublic static String readString(InputStream in, javax.ws.rs.core.MediaType mediaType) throws IOException - Parameters:
- in- input stream
- mediaType- media type
- Returns:
- string data
- Throws:
- IOException- if I/O error occurred
 
 - 
getAvailableMediaTypespublic static List<javax.ws.rs.core.MediaType> getAvailableMediaTypes(String[] mediaTypes) - Parameters:
- mediaTypes- string array of media types
- Returns:
- list of media types
 
 - 
getAvailableVariantspublic static List<javax.ws.rs.core.Variant> getAvailableVariants(String[] mediaTypes) - Parameters:
- mediaTypes- string array of media types
- Returns:
- list of Variant
 
 - 
getAvailableVariantspublic static List<javax.ws.rs.core.Variant> getAvailableVariants(List<javax.ws.rs.core.MediaType> mediaTypes) - Parameters:
- mediaTypes- list of media types
- Returns:
- list of Variant
 
 - 
writeTopublic static void writeTo(InputStream in, OutputStream out) throws IOException - Parameters:
- in- input stream
- out- output stream
- Throws:
- IOException- if I/O error occurred
 
 - 
writeToAndCloseInputpublic static CompletionStage<Void> writeToAndCloseInput(InputStream in, AsyncOutputStream out) - Parameters:
- in- input stream
- out- output stream
- Throws:
- IOException- if I/O error occurred
 
 - 
writeTopublic static CompletionStage<Void> writeTo(InputStream in, AsyncOutputStream out) - Parameters:
- in- input stream
- out- output stream
- Throws:
- IOException- if I/O error occurred
 
 - 
asyncReadpublic static int asyncRead(InputStream in, byte[] buf) 
 - 
asyncReadpublic static int asyncRead(InputStream in, byte[] buf, int offset, int length) 
 - 
completedExceptionpublic static CompletionStage<Void> completedException(Throwable t) 
 
- 
 
-