Package org.kohsuke.github
Class PayloadRule
- java.lang.Object
-
- org.kohsuke.github.PayloadRule
-
- All Implemented Interfaces:
org.junit.rules.TestRule
public class PayloadRule extends Object implements org.junit.rules.TestRule
- Author:
- Stephen Connolly
-
-
Constructor Summary
Constructors Constructor Description PayloadRule(String type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.junit.runners.model.Statementapply(org.junit.runners.model.Statement base, org.junit.runner.Description description)byte[]asBytes()InputStreamasInputStream()ReaderasReader()ReaderasReader(String encoding)ReaderasReader(Charset encoding)ReaderasReader(Function<String,String> transformer)StringasString()StringasString(String encoding)StringasString(Charset encoding)
-
-
-
Constructor Detail
-
PayloadRule
public PayloadRule(String type)
-
-
Method Detail
-
apply
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description)- Specified by:
applyin interfaceorg.junit.rules.TestRule
-
asInputStream
public InputStream asInputStream() throws FileNotFoundException
- Throws:
FileNotFoundException
-
asBytes
public byte[] asBytes() throws IOException- Throws:
IOException
-
asString
public String asString(Charset encoding) throws IOException
- Throws:
IOException
-
asString
public String asString(String encoding) throws IOException
- Throws:
IOException
-
asString
public String asString() throws IOException
- Throws:
IOException
-
asReader
public Reader asReader() throws FileNotFoundException
- Throws:
FileNotFoundException
-
asReader
public Reader asReader(@Nonnull Function<String,String> transformer) throws IOException
- Throws:
IOException
-
asReader
public Reader asReader(String encoding) throws IOException
- Throws:
IOException
-
asReader
public Reader asReader(Charset encoding) throws FileNotFoundException
- Throws:
FileNotFoundException
-
-