Pipes everything from the source to the dest. If dest is null, then everything is read from source and thrown away.
(InputStream source, OutputStream dest)
| 1082 | * source and thrown away. |
| 1083 | */ |
| 1084 | private static void pipe(InputStream source, OutputStream dest) throws IOException { |
| 1085 | if (dest == null) { |
| 1086 | dest = NullOutputStream.INSTANCE; |
| 1087 | } |
| 1088 | // copy source to dest |
| 1089 | source.transferTo(dest); |
| 1090 | dest.flush(); |
| 1091 | } |
| 1092 | |
| 1093 | public Predicate<Path> getFileFilterFromFileTypes(String fileTypes) { |
| 1094 | String glob; |