public final class UriByteSource extends BeanByteSource implements org.joda.beans.ImmutableBean, Serializable
This implementation differs from Guava in that it is a Joda-Bean.
In addition, BeanByteSource.read() throws UncheckedIOException instead of IOException.
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other) |
Optional<String> |
getFileName()
Gets the file name of the source.
|
URI |
getUri()
Gets the URI.
|
int |
hashCode() |
ArrayByteSource |
load()
Loads the content of the byte source into memory.
|
org.joda.beans.MetaBean |
metaBean() |
static UriByteSource |
of(URI uri)
Creates an instance based on the underlying URI.
|
static UriByteSource |
of(URL url)
Creates an instance based on the underlying URL.
|
InputStream |
openStream() |
String |
toString() |
asCharSourceUtf8, asCharSourceUtf8UsingBom, hash, isEmpty, read, readUtf8, readUtf8UsingBom, size, toBase64, toBase64String, toHash, toHashStringasCharSource, concat, concat, concat, contentEquals, copyTo, copyTo, empty, openBufferedStream, read, sizeIfKnown, slice, wrappublic static UriByteSource of(URI uri)
uri - the URIpublic static UriByteSource of(URL url)
url - the URLpublic org.joda.beans.MetaBean metaBean()
metaBean in interface org.joda.beans.Beanpublic Optional<String> getFileName()
BeanByteSourceMost sources originate from a file-based location. This is captured and returned here where available.
getFileName in class BeanByteSourcepublic URI getUri()
public InputStream openStream() throws IOException
openStream in class ByteSourceIOExceptionpublic ArrayByteSource load()
BeanByteSourceload in class BeanByteSourceCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.