Class ArtifactStreams
java.lang.Object
com.atlassian.bamboo.v2.build.agent.messages.ArtifactStreams
Class used to handle serialising of files from directories into streams and deserialising them.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull ArtifactUnpackResult
deserialiseStreamToDir
(InputStream in, Path destination, com.atlassian.event.api.EventPublisher eventPublisher) Deserialises an input stream into the supplied destination pathiterateFilesAndDirs
(Path rootDir) Similar toFileUtils.iterateFilesAndDirs(File, IOFileFilter, IOFileFilter)
but works onPath
s and returns file names relative to root dir.writeFileSetToStream
(org.apache.tools.ant.types.FileSet fileSet, OutputStream out, boolean compression) Serialises a fileset into an output stream.writeFilesToStream
(Path rootDir, Stream<String> filesStream, OutputStream out, boolean httpCompressionOn) Serialises a files into an output stream.
-
Field Details
-
TOO_LONG_PROCESSING_DURATION
-
-
Constructor Details
-
ArtifactStreams
public ArtifactStreams()
-
-
Method Details
-
deserialiseStreamToDir
@NotNull public static @NotNull ArtifactUnpackResult deserialiseStreamToDir(InputStream in, Path destination, com.atlassian.event.api.EventPublisher eventPublisher) throws IOException Deserialises an input stream into the supplied destination path- Throws:
IOException
-
writeFileSetToStream
public static ArtifactHandlerPublishingResult writeFileSetToStream(org.apache.tools.ant.types.FileSet fileSet, OutputStream out, boolean compression) throws IOException Serialises a fileset into an output stream.- Throws:
IOException
-
writeFilesToStream
public static ArtifactHandlerPublishingResult writeFilesToStream(Path rootDir, Stream<String> filesStream, OutputStream out, boolean httpCompressionOn) throws IOException Serialises a files into an output stream.- Throws:
IOException
-
iterateFilesAndDirs
Similar toFileUtils.iterateFilesAndDirs(File, IOFileFilter, IOFileFilter)
but works onPath
s and returns file names relative to root dir. Also, does not include the root directory in the result.- Throws:
IOException
-