Package gov.usgs.earthquake.product
Class URLContent
java.lang.Object
gov.usgs.earthquake.product.AbstractContent
gov.usgs.earthquake.product.URLContent
- All Implemented Interfaces:
Content
Content stored at a URL.
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new URLContent object from a FileContent.URLContent
(URL content) Create a new URLContent object. -
Method Summary
Methods inherited from class gov.usgs.earthquake.product.AbstractContent
getContentType, getLastModified, getLength, getSha256, getSha256, setContentType, setLastModified, setLength, setSha256
-
Constructor Details
-
URLContent
Create a new URLContent object.- Parameters:
content
- the content available at a URL.- Throws:
URISyntaxException
- on URI error
-
URLContent
Create a new URLContent object from a FileContent.- Parameters:
fc
- the file content.- Throws:
MalformedURLException
- if URL error
-
-
Method Details
-
getInputStream
Description copied from interface:Content
The content bytes as a stream.- Returns:
- an InputStream for the wrapped content.
- Throws:
IOException
- on IO error
-
getURL
- Returns:
- the wrapped url.
-
close
public void close()Free any resources associated with this content.
-