public class ReferencePackage extends AbstractDistributionPackage
DistributionPackage
providing a reference to it
by its DistributionPackage.getId()
.PACKAGES_ROOT
Constructor and Description |
---|
ReferencePackage(DistributionPackage distributionPackage) |
Modifier and Type | Method and Description |
---|---|
void |
acquire(String... holderNames)
acquire a reference to this package and increase the reference count.
|
void |
close()
closes all resources associated with this instance
|
@NotNull InputStream |
createInputStream()
creates a package stream.
|
void |
delete()
releases all resources associated with this package
|
@Nullable String |
getDigestAlgorithm() |
String |
getDigestMessage() |
@NotNull String |
getId()
get package id.
|
long |
getSize() |
@NotNull String |
getType()
get the type of package
|
static @Nullable String |
idFromReference(String reference) |
static boolean |
isReference(String string) |
void |
release(String... holderNames)
release a reference to this package and decrease the reference count.
|
getInfo
public ReferencePackage(DistributionPackage distributionPackage)
public void acquire(@NotNull String... holderNames)
SharedDistributionPackage
public void release(@NotNull String... holderNames)
SharedDistributionPackage
DistributionPackage#delete
method will be invoked.@NotNull public @NotNull InputStream createInputStream() throws IOException
DistributionPackage
InputStream
IOException
public long getSize()
public void close()
DistributionPackage
public void delete()
DistributionPackage
@NotNull public @NotNull String getType()
DistributionPackage
getType
in interface DistributionPackage
getType
in class AbstractDistributionPackage
@NotNull public @NotNull String getId()
DistributionPackage
getId
in interface DistributionPackage
getId
in class AbstractDistributionPackage
@Nullable public @Nullable String getDigestAlgorithm()
getDigestAlgorithm
in class AbstractDistributionPackage
public String getDigestMessage()
getDigestMessage
in class AbstractDistributionPackage
public static boolean isReference(String string)
Copyright © 2007–2018 The Apache Software Foundation. All rights reserved.