public final class ArtifactSinkFactory extends Object
Constructor and Description |
---|
ArtifactSinkFactory() |
Modifier and Type | Method and Description |
---|---|
static IRawArtifactSink |
rawWriteToStream(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor artifactDescriptor,
OutputStream destination)
Returns an
IRawArtifactSink instance for writing an artifact in a raw format to the
given output stream. |
static IArtifactSink |
writeToStream(org.eclipse.equinox.p2.metadata.IArtifactKey artifactKey,
OutputStream destination)
Returns an
IArtifactSink instance for writing an artifact to an output stream. |
public static IArtifactSink writeToStream(org.eclipse.equinox.p2.metadata.IArtifactKey artifactKey, OutputStream destination)
IArtifactSink
instance for writing an artifact to an output stream.
Note that IArtifactSink.beginWrite()
can only be called once on the returned artifact
sink, i.e. the returned instance has no support for re-starting the write operation in case
the first write attempt fails.
artifactKey
- The key of the artifact to be written.destination
- The output stream to write the artifact content to. The ownership of the stream is
not transferred, i.e. neither this method nor the returned IArtifactSink
will call OutputStream.close()
on the stream.public static IRawArtifactSink rawWriteToStream(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor artifactDescriptor, OutputStream destination)
IRawArtifactSink
instance for writing an artifact in a raw format to the
given output stream.
Note that IArtifactSink.beginWrite()
can only be called once on the returned
artifact sink, i.e. the returned instance has no support for re-starting the write operation
in case the first write attempt fails.
artifactDescriptor
- An IArtifactDescriptor
specifying artifact and format to be written.destination
- The output stream to write the raw content to. The ownership of the stream is not
transferred, i.e. neither this method nor the returned IRawArtifactSink
will call OutputStream.close()
on the stream.Copyright © 2008–2016 Eclipse Foundation. All rights reserved.