Ejemplo n.º 1
0
 /**
  * Convenience method for turning a resource into a GZIP file that can be used as input.
  *
  * @param resource name (classpath) of the resource.
  * @param file a <code>File</code> to write to
  * @return a <code>File</code> containing the string content (same as <code>file</code>).
  * @throws IOException if an error occurs
  */
 public static File resourceToGzFile(final String resource, final File file) throws IOException {
   try (InputStream stream = Resources.getResourceAsStream(resource)) {
     return FileHelper.streamToGzFile(stream, file);
   }
 }