private File createFile(final FileHeader fh, final File destination) { File f = null; String name = null; if (fh.isFileHeader() && fh.isUnicode()) { name = fh.getFileNameW(); } else { name = fh.getFileNameString(); } f = new File(destination, name); if (!f.exists()) { try { f = makeFile(destination, name); } catch (final IOException e) { logger.error("error creating the new file: " + f.getName(), e); } } return f; }
@Override public File createDirectory(final FileHeader fh) { File f = null; if (fh.isDirectory() && fh.isUnicode()) { f = new File(folderDestination, fh.getFileNameW()); if (!f.exists()) { makeDirectory(folderDestination, fh.getFileNameW()); } } else if (fh.isDirectory() && !fh.isUnicode()) { f = new File(folderDestination, fh.getFileNameString()); if (!f.exists()) { makeDirectory(folderDestination, fh.getFileNameString()); } } return f; }
@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()); }
if (isUnicode()) { int length = 0; fileName = "";
if (isUnicode()) { int length = 0; fileName = "";