Package net.sf.sevenzipjbinding

Examples of net.sf.sevenzipjbinding.SevenZipException


            public int write(byte[] data) throws SevenZipException {
              try {
                out.write(data);
              } catch (IOException e) {
                LOGGER.debug("Caught exception", e);
                throw new SevenZipException();
              }
              return data.length;
            }
          });
        } catch (FileNotFoundException | SevenZipException e) {
View Full Code Here


        return 0;
      } else {
        return read;
      }
    } catch (IOException e) {
      throw new SevenZipException("Error reading input stream", e);
    }
  }
View Full Code Here

        throw new RuntimeException("Seek: unknown origin: " + seekOrigin);
      }

      return randomAccessFile.getFilePointer();
    } catch (IOException e) {
      throw new SevenZipException("Error while seek operation", e);
    }
  }
View Full Code Here

      } else {
        return read;
      }

    } catch (IOException e) {
      throw new SevenZipException("Error reading random access file", e);
    }
  }
View Full Code Here

      throws SevenZipException {
    this.archiveOpenVolumeCallback = archiveOpenVolumeCallback;
    volumePositions.add(Long.valueOf(0));

    if (!firstVolumeFilename.endsWith(SEVEN_ZIP_FIRST_VOLUME_POSTFIX)) {
      throw new SevenZipException("The first 7z volume filename '" + firstVolumeFilename
          + "' don't ends with the postfix: '" + SEVEN_ZIP_FIRST_VOLUME_POSTFIX + "'. Can't proceed");

    }

    cuttedVolumeFilename = firstVolumeFilename.substring(0, firstVolumeFilename.length() - 3);
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public Object getProperty(int index, PropID propID) throws SevenZipException {
    if (index < 0 || index >= getNumberOfItems()) {
      throw new SevenZipException("Index out of range. Index: " + index + ", NumberOfItems: "
          + getNumberOfItems());
    }
    // Correct some returned values
    Object returnValue = nativeGetProperty(index, propID.getPropIDIndex());
    switch (propID) {
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public String getStringProperty(int index, PropID propID) throws SevenZipException {
    if (index < 0 || index >= getNumberOfItems()) {
      throw new SevenZipException("Index out of range. Index: " + index + ", NumberOfItems: "
          + getNumberOfItems());
    }
    return nativeGetStringProperty(index, propID.getPropIDIndex());
  }
View Full Code Here

   * @throws SevenZipException
   *             archive can't be accessed any more
   */
  public ISevenZipInArchive testAndGetSafeSevenZipInArchive() throws SevenZipException {
    if (wasClosed) {
      throw new SevenZipException("Archive was closed");
    }
    return sevenZipInArchive;
  }
View Full Code Here

  /**
   * ${@inheritDoc}
   */
  public ISimpleInArchiveItem getArchiveItem(int index) throws SevenZipException {
    if (index < 0 || index >= sevenZipInArchive.getNumberOfItems()) {
      throw new SevenZipException("Index " + index + " is out of range. Number of items in archive: "
          + sevenZipInArchive.getNumberOfItems());
    }
    return new SimpleInArchiveItemImpl(this, index);
  }
View Full Code Here

        @Override
        public int write(byte[] bytes) throws SevenZipException {
            try {
                output.write(bytes);
            } catch (IOException ex) {
                throw new SevenZipException(
                        NbBundle.getMessage(this.getClass(), "SevenZipIngestModule.UnpackStream.write.exception.msg",
                        localAbsPath), ex);
            }
            return bytes.length;
        }
View Full Code Here

TOP

Related Classes of net.sf.sevenzipjbinding.SevenZipException

Copyright © 2018 www.massapicom. 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.