@Override public void print() { super.print(); StringBuilder str = new StringBuilder(); str.append("unpSize: " + getUnpSize()); str.append("\nHostOS: " + hostOS.name()); str.append("\nMDate: " + mTime); str.append("\nFileName: " + getFileNameString()); str.append("\nunpMethod: " + Integer.toHexString(getUnpMethod())); str.append("\nunpVersion: " + Integer.toHexString(getUnpVersion())); str.append("\nfullpackedsize: " + getFullPackSize()); str.append("\nfullunpackedsize: " + getFullUnpackSize()); str.append("\nisEncrypted: " + isEncrypted()); str.append("\nisfileHeader: " + isFileHeader()); str.append("\nisSolid: " + isSolid()); str.append("\nisSplitafter: " + isSplitAfter()); str.append("\nisSplitBefore:" + isSplitBefore()); str.append("\nunpSize: " + getUnpSize()); str.append("\ndataSize: " + getDataSize()); str.append("\nisUnicode: " + isUnicode()); str.append("\nhasVolumeNumber: " + hasVolumeNumber()); str.append("\nhasArchiveDataCRC: " + hasArchiveDataCRC()); str.append("\nhasSalt: " + hasSalt()); str.append("\nhasEncryptVersions: " + hasEncryptVersion()); str.append("\nisSubBlock: " + isSubBlock()); logger.info(str.toString()); }
@Override public void print() { super.print(); StringBuilder str = new StringBuilder(); str.append("unpSize: " + getUnpSize()); str.append("\nHostOS: " + hostOS.name()); str.append("\nMDate: " + mTime); str.append("\nFileName: " + getFileNameString()); str.append("\nunpMethod: " + Integer.toHexString(getUnpMethod())); str.append("\nunpVersion: " + Integer.toHexString(getUnpVersion())); str.append("\nfullpackedsize: " + getFullPackSize()); str.append("\nfullunpackedsize: " + getFullUnpackSize()); str.append("\nisEncrypted: " + isEncrypted()); str.append("\nisfileHeader: " + isFileHeader()); str.append("\nisSolid: " + isSolid()); str.append("\nisSplitafter: " + isSplitAfter()); str.append("\nisSplitBefore:" + isSplitBefore()); str.append("\nunpSize: " + getUnpSize()); str.append("\ndataSize: " + getDataSize()); str.append("\nisUnicode: " + isUnicode()); str.append("\nhasVolumeNumber: " + hasVolumeNumber()); str.append("\nhasArchiveDataCRC: " + hasArchiveDataCRC()); str.append("\nhasSalt: " + hasSalt()); str.append("\nhasEncryptVersions: " + hasEncryptVersion()); str.append("\nisSubBlock: " + isSubBlock()); logger.info(str.toString()); }
public void init(FileHeader hd) throws IOException { long startPos = hd.getPositionInFile() + hd.getHeaderSize(); unpPackedSize = hd.getFullPackSize(); inputStream = new ReadOnlyAccessInputStream( archive.getRof(), startPos, startPos + unpPackedSize ); subHead = hd; curUnpRead = 0; curPackWrite = 0; packedCRC = 0xFFffFFff; }
public void init(FileHeader hd) throws IOException { long startPos = hd.getPositionInFile() + hd.getHeaderSize(); unpPackedSize = hd.getFullPackSize(); inputStream = new ReadOnlyAccessInputStream(archive.getRof(), startPos, startPos + unpPackedSize); subHead = hd; curUnpRead = 0; curPackWrite = 0; packedCRC = 0xFFffFFff; }
private void setFile(IReadOnlyAccess file, long length) throws IOException { totalPackedSize = 0L; totalPackedRead = 0L; close(); rof = file; try { readHeaders(length); } catch (Exception e) { logger.log(Level.WARNING, "exception in archive constructor maybe file is encrypted " + "or currupt", e); // ignore exceptions to allow exraction of working files in // corrupt archive } // Calculate size of packed data for (BaseBlock block : headers) { if (block.getHeaderType() == UnrarHeadertype.FileHeader) { totalPackedSize += ((FileHeader) block).getFullPackSize(); } } if (unrarCallback != null) { unrarCallback.volumeProgressChanged(totalPackedRead, totalPackedSize); } }
private void setFile(final IReadOnlyAccess file, final long length) throws IOException, RarException { this.totalPackedSize = 0L; this.totalPackedRead = 0L; close(); this.rof = file; try { readHeaders(length); } catch (final Exception e) { logger.warn( "exception in archive constructor maybe file is encrypted, corrupt or support not yet implemented", e); // Rethrow unsupportedRarException if (e instanceof RarException && ((RarException) e).getType() == RarExceptionType.unsupportedRarArchive) { throw (RarException) e; } // ignore exceptions to allow extraction of working files in // corrupt archive } // Calculate size of packed data for (final BaseBlock block : this.headers) { if (block.getHeaderType() == UnrarHeadertype.FileHeader) { this.totalPackedSize += ((FileHeader) block).getFullPackSize(); } } if (this.unrarCallback != null) { this.unrarCallback.volumeProgressChanged(this.totalPackedRead, this.totalPackedSize); } }
this.headers.add(fh); newpos = fh.getPositionInFile() + fh.getHeaderSize() + fh.getFullPackSize(); if (processedPositions.contains(newpos)) { throw new RarException(RarExceptionType.badRarArchive);
headers.add(fh); newpos = fh.getPositionInFile() + fh.getHeaderSize() + fh.getFullPackSize(); rof.setPosition(newpos); break;