Package io.nosqlbench.nb.api.content
Class URLContent
java.lang.Object
io.nosqlbench.nb.api.content.URLContent
- All Implemented Interfaces:
Content<java.net.URL>,java.lang.Comparable<Content<?>>,java.util.function.Supplier<java.lang.CharSequence>
public class URLContent extends java.lang.Object implements Content<java.net.URL>
StreamContent is meant for short-lived use as an efficient way to
find a read URL content. If a caller has already acquired an
input stream, it can be passed to the stream content holder
to avoid double fetch or other unintuitive and inefficient
behavior.
-
Constructor Summary
Constructors Constructor Description URLContent(java.net.URL url, java.io.InputStream inputStream) -
Method Summary
Modifier and Type Method Description java.nio.file.PathasPath()booleanequals(java.lang.Object o)java.nio.CharBuffergetCharBuffer()java.net.URLgetLocation()java.net.URIgetURI()inthashCode()java.lang.StringtoString()
-
Constructor Details
-
URLContent
public URLContent(java.net.URL url, java.io.InputStream inputStream)
-
-
Method Details
-
getLocation
public java.net.URL getLocation()- Specified by:
getLocationin interfaceContent<java.net.URL>
-
getURI
public java.net.URI getURI() -
equals
public boolean equals(java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
getCharBuffer
public java.nio.CharBuffer getCharBuffer()- Specified by:
getCharBufferin interfaceContent<java.net.URL>
-
asPath
public java.nio.file.Path asPath() -
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-