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.Path asPath()  
    boolean equals​(java.lang.Object o)  
    java.nio.CharBuffer getCharBuffer()  
    java.net.URL getLocation()  
    java.net.URI getURI()  
    int hashCode()  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface io.nosqlbench.nb.api.content.Content

    asString, compareTo, get, getInputStream, getReader, getURL
  • Constructor Details

    • URLContent

      public URLContent​(java.net.URL url, java.io.InputStream inputStream)
  • Method Details

    • getLocation

      public java.net.URL getLocation()
      Specified by:
      getLocation in interface Content<java.net.URL>
    • getURI

      public java.net.URI getURI()
      Specified by:
      getURI in interface Content<java.net.URL>
    • equals

      public boolean equals​(java.lang.Object o)
      Overrides:
      equals in class java.lang.Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • getCharBuffer

      public java.nio.CharBuffer getCharBuffer()
      Specified by:
      getCharBuffer in interface Content<java.net.URL>
    • asPath

      public java.nio.file.Path asPath()
      Specified by:
      asPath in interface Content<java.net.URL>
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object