@Beta public static class ClassPath.ResourceInfo extends Object
Modifier and Type | Method and Description |
---|---|
ByteSource |
asByteSource()
Returns a
ByteSource view of the resource from which its bytes can be read. |
CharSource |
asCharSource(Charset charset)
Returns a
CharSource view of the resource from which its bytes can be read as
characters decoded with the given charset . |
boolean |
equals(Object obj) |
String |
getResourceName()
Returns the fully qualified name of the resource.
|
int |
hashCode() |
String |
toString() |
URL |
url()
Returns the url identifying the resource.
|
public final URL url()
NoSuchElementException
- if the resource cannot be loaded through the class loader,
despite physically existing in the class path.public final ByteSource asByteSource()
ByteSource
view of the resource from which its bytes can be read.NoSuchElementException
- if the resource cannot be loaded through the class loader,
despite physically existing in the class path.public final CharSource asCharSource(Charset charset)
CharSource
view of the resource from which its bytes can be read as
characters decoded with the given charset
.NoSuchElementException
- if the resource cannot be loaded through the class loader,
despite physically existing in the class path.public final String getResourceName()
Copyright © 2010-2017. All Rights Reserved.