Package com.github.junrar

Examples of com.github.junrar.Archive.extractFile()


        if (fh.isDirectory()) {
      createDirectory(fh, destination);
        } else {
      File f = createFile(fh, destination);
      OutputStream stream = new FileOutputStream(f);
      arch.extractFile(fh, stream);
      stream.close();
        }
    } catch (IOException e) {
        logger.error("error extracting the file", e);
    } catch (RarException e) {
View Full Code Here


           
            ByteArrayOutputStream os = new ByteArrayOutputStream();
           
           
            try {
              arc.extractFile(fh, os);
            } catch (RarException e) {
              if(e.getType().equals(RarExceptionType.notImplementedYet)){
                logger.error("error extracting unsupported file: "+fh.getFileNameString(),e);
                unsupportedFiles.add(file.toString());
                return;
View Full Code Here

              break;
            }
          }
          if (header != null) {
            LOGGER.trace("Starting the extraction of " + header.getFileNameString());
            rarFile.extractFile(header, out);
          }
        } catch (RarException | IOException e) {
          LOGGER.debug("Unpack error, maybe it's normal, as backend can be terminated: " + e.getMessage());
        } finally {
          try {
View Full Code Here

              break;
            }
          }
          if (header != null) {
            logger.trace("Starting the extraction of " + header.getFileNameString());
            rarFile.extractFile(header, out);
          }
        } catch (Exception e) {
          logger.debug("Unpack error, maybe it's normal, as backend can be terminated: " + e.getMessage());
        } finally {
          try {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.