Class Resource

java.lang.Object
org.jenkinsci.test.acceptance.junit.Resource

public class Resource extends Object
Wraps a resource found by Class.getResource(String).
Author:
Kohsuke Kawaguchi
  • Field Details

    • url

      public final URL url
  • Constructor Details

    • Resource

      public Resource(URL url)
  • Method Details

    • 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()