Class ProviderHelper
java.lang.Object
org.jboss.resteasy.plugins.providers.ProviderHelper
A utility class to provide supporting functionality to various
entity providers.
- Version:
- $Revision: $
- Author:
- Ryan J. McDonough
-
Method Summary
Modifier and TypeMethodDescriptionstatic intasyncRead(InputStream in, byte[] buf) static intasyncRead(InputStream in, byte[] buf, int offset, int length) static CompletionStage<Void> static List<jakarta.ws.rs.core.MediaType> getAvailableMediaTypes(String[] mediaTypes) static List<jakarta.ws.rs.core.Variant> getAvailableVariants(String[] mediaTypes) static List<jakarta.ws.rs.core.Variant> getAvailableVariants(List<jakarta.ws.rs.core.MediaType> mediaTypes) static Stringstatic StringreadString(InputStream in, jakarta.ws.rs.core.MediaType mediaType) static voidwriteTo(InputStream in, OutputStream out) static CompletionStage<Void> writeTo(InputStream in, AsyncOutputStream out) static CompletionStage<Void>
-
Method Details
-
readString
- Parameters:
in- input stream- Returns:
- string data
- Throws:
IOException- if I/O error occurred
-
readString
public static String readString(InputStream in, jakarta.ws.rs.core.MediaType mediaType) throws IOException - Parameters:
in- input streammediaType- media type- Returns:
- string data
- Throws:
IOException- if I/O error occurred
-
getAvailableMediaTypes
- Parameters:
mediaTypes- string array of media types- Returns:
- list of media types
-
getAvailableVariants
- Parameters:
mediaTypes- string array of media types- Returns:
- list of
Variant
-
getAvailableVariants
public static List<jakarta.ws.rs.core.Variant> getAvailableVariants(List<jakarta.ws.rs.core.MediaType> mediaTypes) - Parameters:
mediaTypes- list of media types- Returns:
- list of
Variant
-
writeTo
- Parameters:
in- input streamout- output stream- Throws:
IOException- if I/O error occurred
-
writeToAndCloseInput
- Parameters:
in- input streamout- output stream- Throws:
IOException- if I/O error occurred
-
writeTo
- Parameters:
in- input streamout- output stream- Throws:
IOException- if I/O error occurred
-
asyncRead
-
asyncRead
-
completedException
-