public class ProbeArtifactSink extends Object implements IArtifactSink
Constructor and Description |
---|
ProbeArtifactSink(org.eclipse.equinox.p2.metadata.IArtifactKey artifactKey) |
Modifier and Type | Method and Description |
---|---|
void |
abortWrite()
Method for aborting the write operation.
|
OutputStream |
beginWrite()
Method for starting the write operation.
|
boolean |
canBeginWrite()
Check if
IArtifactSink.beginWrite() can be called on this instance. |
void |
checkConsistencyWithStatus(org.eclipse.core.runtime.IStatus status) |
int |
committedBytes() |
void |
commitWrite()
Method to committing the write operation.
|
org.eclipse.equinox.p2.metadata.IArtifactKey |
getArtifactToBeWritten()
Returns the key of the artifact expected by this instance.
|
Set<String> |
getFilesInZip() |
static ProbeArtifactSink |
newArtifactSinkFor(org.eclipse.equinox.p2.metadata.IArtifactKey artifactKey) |
boolean |
writeIsAborted() |
boolean |
writeIsCommitted() |
boolean |
writeIsStarted() |
public ProbeArtifactSink(org.eclipse.equinox.p2.metadata.IArtifactKey artifactKey)
public static ProbeArtifactSink newArtifactSinkFor(org.eclipse.equinox.p2.metadata.IArtifactKey artifactKey)
public org.eclipse.equinox.p2.metadata.IArtifactKey getArtifactToBeWritten()
IArtifactSink
getArtifactToBeWritten
in interface IArtifactSink
public boolean canBeginWrite()
IArtifactSink
IArtifactSink.beginWrite()
can be called on this instance. This method will typically
return false
if IArtifactSink.commitWrite()
has already been called on this instance,
or if IArtifactSink.beginWrite()
has been called before and the instance doesn't support
re-starting the write operation.canBeginWrite
in interface IArtifactSink
true
if IArtifactSink.beginWrite()
can be called on this instance.public OutputStream beginWrite()
IArtifactSink
beginWrite
in interface IArtifactSink
OutputStream
to write the artifact content to. The ownership of the
stream is not transferred to the caller, i.e. OutputStream.close()
must not be called on the returned instance. Instead, call IArtifactSink.commitWrite()
or
IArtifactSink.abortWrite()
to free any allocated resources.public boolean writeIsStarted()
public void abortWrite()
IArtifactSink
abortWrite
in interface IArtifactSink
public boolean writeIsAborted()
public void commitWrite()
IArtifactSink
OutputStream
returned by IArtifactSink.beginWrite()
.commitWrite
in interface IArtifactSink
public boolean writeIsCommitted()
public int committedBytes()
public Set<String> getFilesInZip() throws IOException
IOException
public void checkConsistencyWithStatus(org.eclipse.core.runtime.IStatus status)
Copyright © 2008–2020 Eclipse Foundation. All rights reserved.