Package com.google.common.io
Class Resources.UrlByteSource
java.lang.Object
com.google.common.io.ByteSource
com.google.common.io.Resources.UrlByteSource
- Enclosing class:
Resources
A byte source that reads from a URL using
URL.openStream()
.-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.common.io.ByteSource
ByteSource.AsCharSource
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionOpens a newInputStream
for reading from this source.toString()
Methods inherited from class com.google.common.io.ByteSource
asCharSource, concat, concat, concat, contentEquals, copyTo, copyTo, empty, hash, isEmpty, openBufferedStream, read, read, size, sizeIfKnown, slice, wrap
-
Field Details
-
url
-
-
Constructor Details
-
UrlByteSource
-
-
Method Details
-
openStream
Description copied from class:ByteSource
Opens a newInputStream
for reading from this source. This method returns a new, independent stream each time it is called.The caller is responsible for ensuring that the returned stream is closed.
- Specified by:
openStream
in classByteSource
- Throws:
IOException
- if an I/O error occurs while opening the stream
-
toString
-