public class HttpImage extends AbstractImage implements UriImage
Modifier | Constructor and Description |
---|---|
protected |
HttpImage(URL url,
org.apache.http.client.HttpClient httpClient) |
Modifier and Type | Method and Description |
---|---|
byte[] |
getBytes()
Return the resource as a byte array.
|
ByteString |
getByteString()
Return the resource as a byte array's clone.
|
InputStream |
getInputStream()
Create an input stream for this resource.
|
ResourceInfo |
getResourceInfo() |
long |
getSize()
Return size of the resource in bytes.
|
String |
getUriAsString()
Returns the uri (and hence a unique identifier) for a resource as a String.
|
getContentType, getExtension, setContentType, setExtension
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getContentType, getExtension
protected HttpImage(URL url, org.apache.http.client.HttpClient httpClient) throws URISyntaxException, NoSuchAlgorithmException, KeyManagementException
public String getUriAsString()
UriResource
getUriAsString
in interface UriResource
public ResourceInfo getResourceInfo()
getResourceInfo
in interface UriImage
public InputStream getInputStream() throws IOException
Resource
getInputStream
in interface Resource
IOException
public byte[] getBytes() throws IOException
Resource
getBytes
in interface Resource
IOException
public ByteString getByteString() throws IOException
Resource
getByteString
in interface Resource
IOException
public long getSize() throws IOException
Resource
getSize
in interface Resource
IOException
Copyright (c) 2014-2021 All Rights Reserved by the RWS Group for and on behalf of its affiliates and subsidiaries