Package er.woinstaller.io

Examples of er.woinstaller.io.BoundedInputStream


            }
            else if ((mode & S_IFREG) == S_IFREG) {
              if (destinationFile.exists()) {
                throw new IOException("The file '" + destinationFile + "' already exists.");
              }
              InputStream is = new BoundedInputStream(paxStream, 0, fileSize);
              FileOutputStream fos = new FileOutputStream(destinationFile);
              FileUtilities.writeInputStreamToOutputStream(is, fos, fileSize, new NullProgressMonitor());
            }
            else {
              throw new IOException("Unknown mode " + modeStr + " for " + name + ".");
View Full Code Here


          skipFully(inputStream, toSkip);
          currentOffset = 0;
        }
        newOffset = entry.getOffset() - currentOffset;
        currentOffset = entry.getOffset() + entry.getLength();
        InputStream input = new BoundedInputStream(inputStream, newOffset, entry.getLength());
        if (compression == null) {
          // Do nothing
        } else
        if ("bzip2".equals(compression)) {
          skipFully(input, 2);
View Full Code Here

        e.printStackTrace();
      }
    }
 
    private String readToc() throws IOException {
      InputStream inflate = new InflaterInputStream(new BoundedInputStream(inputStream, 0,
          header.tocLengthCompressed.longValue()));
      try {
        byte[] buffer = new byte[BUFFER_SIZE];
        BigInteger length = new BigInteger(header.tocLengthUncompressed.toByteArray());
        int read;
View Full Code Here

TOP

Related Classes of er.woinstaller.io.BoundedInputStream

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.