download artifact of type image using java??
Hello,
i have a module in rm, which has many artifacts. one of the artifact is a image and i want to download the image to my local using java. assuming that i have the artifact url with me could any one please share on how i can download artifact which is an image. or if i have an URL of the resource(jpg file here), how can i download it?? when tried to get it via getresource as Bufferedimage i get following error; java.lang.RuntimeException: A javax.ws.rs.ext.MessageBodyReader implementation was not found for class java.awt.image.BufferedImage type and image/jpeg;charset=UTF-8 media type. Verify that all entity providers are correctly registered. Add a custom javax.ws.rs.ext.MessageBodyReader provider to handle the type and media type if a JAX-RS entity provider does not currently exist. if i try directly using url.openConnection() i get authorization error. please help |
One answer
How can I resolve the 'avax.ws.rs.ext.MessageBodyReader error when trying to download an image artifact using Java from a module in RM? I've encountered this issue while attempting to use 'getresource' for a JPEG file, resulting in the mentioned runtime exception. Additionally, when using url.openConnection(), I'm facing an authorization error.
Any insights on resolving these challenges would be appreciated.
Thanks!
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.