Class Resource
- java.lang.Object
-
- org.jenkinsci.test.acceptance.junit.Resource
-
public class Resource extends Object
Wraps a resource found byClass.getResource(String)
.- Author:
- Kohsuke Kawaguchi
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
asByteArray()
File
asFile()
InputStream
asInputStream()
Reader
asReader()
String
asText()
String
getName()
Gets just the file name portion without any paths, like "foo.txt"
-
-
-
Field Detail
-
url
public final URL url
-
-
Constructor Detail
-
Resource
public Resource(URL url)
-
-
Method Detail
-
getName
public String getName()
Gets just the file name portion without any paths, like "foo.txt"
-
asInputStream
public InputStream asInputStream()
-
asReader
public Reader asReader()
-
asText
public String asText()
-
asByteArray
public byte[] asByteArray() throws IOException
- Throws:
IOException
-
asFile
public File asFile()
-
-