-
Notifications
You must be signed in to change notification settings - Fork 740
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #967 from chids/download-repository-archives
Add support for downloading zip and tar archives of repositories.
- Loading branch information
Showing
22 changed files
with
882 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/main/java/org/kohsuke/github/function/FunctionThrows.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package org.kohsuke.github.function; | ||
|
||
/** | ||
* A functional interface, equivalent to {@link java.util.function.Function} but that allows throwing {@link Throwable} | ||
* | ||
* @param <T> | ||
* the type of input | ||
* @param <R> | ||
* the type of output | ||
* @param <E> | ||
* the type of error | ||
*/ | ||
@FunctionalInterface | ||
public interface FunctionThrows<T, R, E extends Throwable> { | ||
/** | ||
* Apply r. | ||
* | ||
* @param input | ||
* the input | ||
* @return the r | ||
* @throws E | ||
* the e | ||
*/ | ||
R apply(T input) throws E; | ||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/org/kohsuke/github/function/InputStreamFunction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package org.kohsuke.github.function; | ||
|
||
import java.io.IOException; | ||
import java.io.InputStream; | ||
|
||
/** | ||
* A functional interface, equivalent to {@link java.util.function.Function} but that allows throwing {@link Throwable} | ||
* | ||
* @param <R> | ||
* the type to of object to be returned | ||
*/ | ||
@FunctionalInterface | ||
public interface InputStreamFunction<R> extends FunctionThrows<InputStream, R, IOException> { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.