com.swak.license.api.io.ArchiveOutputStream Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of swak-license-core Show documentation
Show all versions of swak-license-core Show documentation
swak component of trueLicense core
The newest version!
/*
* Copyright (C) 2013-2018 Schlichtherle IT Services.
* All rights reserved. Use is subject to license terms.
*/
package com.swak.license.api.io;
import java.io.Closeable;
/**
* An abstraction for writing archive entries to an archive file.
*
* @see ArchiveInputStream
* @author Christian Schlichtherle
*/
public interface ArchiveOutputStream extends Closeable {
/**
* Returns {@code true} if and only if this archive output is writing to a JAR file.
*/
default boolean isJar() {
return false;
}
/**
* Returns a sink for writing the archive entry with the given name.
*
* @param name the archive entry name, where elements are separated by {@code /} and directory names end with a
* {@code /}.
* @throws IllegalArgumentException if the normalized form of the given archive entry name is absolute or empty or
* has {@code ..} as its first path segment.
*/
ArchiveEntrySink sink(String name);
}