Class ArtifactSinkFactory
- java.lang.Object
-
- org.eclipse.tycho.repository.p2base.artifact.provider.streaming.ArtifactSinkFactory
-
public final class ArtifactSinkFactory extends Object
-
-
Constructor Summary
Constructors Constructor Description ArtifactSinkFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IRawArtifactSink
rawWriteToStream(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor artifactDescriptor, OutputStream destination)
Returns anIRawArtifactSink
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 anIArtifactSink
instance for writing an artifact to an output stream.
-
-
-
Method Detail
-
writeToStream
public static IArtifactSink writeToStream(org.eclipse.equinox.p2.metadata.IArtifactKey artifactKey, OutputStream destination)
Returns anIArtifactSink
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.- Parameters:
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 callOutputStream.close()
on the stream.
-
rawWriteToStream
public static IRawArtifactSink rawWriteToStream(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor artifactDescriptor, OutputStream destination)
Returns anIRawArtifactSink
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.- Parameters:
artifactDescriptor
- AnIArtifactDescriptor
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 callOutputStream.close()
on the stream.
-
-