/** * Set the name of the entry. * @param name the name to use */ protected void setName(String name) { if (name != null && getPlatform() == PLATFORM_FAT && !name.contains("/")) { name = name.replace('\\', '/'); } this.name = name; }
&& myComment.equals(otherComment) && getInternalAttributes() == other.getInternalAttributes() && getPlatform() == other.getPlatform() && getExternalAttributes() == other.getExternalAttributes() && getMethod() == other.getMethod()
putShort((ze.getPlatform() << 8) | (!hasUsedZip64 ? DATA_DESCRIPTOR_MIN_VERSION : ZIP64_MIN_VERSION), buf, CFH_VERSION_MADE_BY_OFFSET);
/** * Creates a new zip entry with fields taken from the specified zip entry. * * <p>Assumes the entry represents a directory if and only if the * name ends with a forward slash "/".</p> * * @param entry the entry to get fields from * @throws ZipException on error */ public ZipArchiveEntry(final ZipArchiveEntry entry) throws ZipException { this((java.util.zip.ZipEntry) entry); setInternalAttributes(entry.getInternalAttributes()); setExternalAttributes(entry.getExternalAttributes()); setExtraFields(getAllExtraFieldsNoCopy()); setPlatform(entry.getPlatform()); final GeneralPurposeBit other = entry.getGeneralPurposeBit(); setGeneralPurposeBit(other == null ? null : (GeneralPurposeBit) other.clone()); }
@Override public synchronized PlexusIoResourceAttributes getAttributes() { int mode = PlexusIoResourceAttributes.UNKNOWN_OCTAL_MODE; if ( entry.getPlatform() == ZipArchiveEntry.PLATFORM_UNIX ) { mode = entry.getUnixMode(); if ( ( mode & UnixStat.FILE_FLAG ) == UnixStat.FILE_FLAG ) { mode = mode & ~UnixStat.FILE_FLAG; } else { mode = mode & ~UnixStat.DIR_FLAG; } } if ( attributes == null ) { attributes = new SimpleResourceAttributes( null, null, null, null, mode ); } return attributes; }
/** * Set the name of the entry. * @param name the name to use */ protected void setName(String name) { if (name != null && getPlatform() == PLATFORM_FAT && !name.contains("/")) { name = name.replace('\\', '/'); } this.name = name; }
&& myComment.equals(otherComment) && getInternalAttributes() == other.getInternalAttributes() && getPlatform() == other.getPlatform() && getExternalAttributes() == other.getExternalAttributes() && getMethod() == other.getMethod()
putShort((ze.getPlatform() << 8) | (!hasUsedZip64 ? DATA_DESCRIPTOR_MIN_VERSION : ZIP64_MIN_VERSION), buf, CFH_VERSION_MADE_BY_OFFSET);
/** * Creates a new zip entry with fields taken from the specified zip entry. * * <p>Assumes the entry represents a directory if and only if the * name ends with a forward slash "/".</p> * * @param entry the entry to get fields from * @throws ZipException on error */ public ZipArchiveEntry(final ZipArchiveEntry entry) throws ZipException { this((java.util.zip.ZipEntry) entry); setInternalAttributes(entry.getInternalAttributes()); setExternalAttributes(entry.getExternalAttributes()); setExtraFields(getAllExtraFieldsNoCopy()); setPlatform(entry.getPlatform()); final GeneralPurposeBit other = entry.getGeneralPurposeBit(); setGeneralPurposeBit(other == null ? null : (GeneralPurposeBit) other.clone()); }