Class FileContent
java.lang.Object
com.cloudbees.jenkins.support.api.Content
com.cloudbees.jenkins.support.filter.PrefilteredContent
com.cloudbees.jenkins.support.api.FileContent
- Direct Known Subclasses:
LaunchLogsFileContent
,TemporaryFileContent
Content that is stored as a file on disk. The content is filtered with the
ContentFilter
defined in the
instance.- Author:
- Stephen Connolly
-
Field Summary
Modifier and TypeFieldDescriptionprotected com.cloudbees.jenkins.support.api.BaseFileContent
protected final File
-
Constructor Summary
ConstructorDescriptionFileContent
(String name, File file) FileContent
(String name, File file, long maxSize) FileContent
(String name, String[] filterableParameters, File file) FileContent
(String name, String[] filterableParameters, File file, long maxSize) -
Method Summary
Modifier and TypeMethodDescriptionprotected InputStream
Instantiates theInputStream
for thefile
.protected String
long
getTime()
void
writeTo
(OutputStream os) void
writeTo
(OutputStream os, ContentFilter filter) Write the component in the bundle filtering the contentMethods inherited from class com.cloudbees.jenkins.support.filter.PrefilteredContent
shouldBeFiltered
Methods inherited from class com.cloudbees.jenkins.support.api.Content
getFilterableParameters, getName
-
Field Details
-
baseFileContent
protected com.cloudbees.jenkins.support.api.BaseFileContent baseFileContent -
file
-
-
Constructor Details
-
FileContent
-
FileContent
-
FileContent
-
FileContent
-
-
Method Details
-
writeTo
- Specified by:
writeTo
in classContent
- Throws:
IOException
-
writeTo
Description copied from class:PrefilteredContent
Write the component in the bundle filtering the content- Specified by:
writeTo
in classPrefilteredContent
- Parameters:
os
- OutputStream where write the contentfilter
- ContentFilter to apply- Throws:
IOException
- If an input or output exception occurs
-
getTime
public long getTime() -
getInputStream
Instantiates theInputStream
for thefile
.- Returns:
- the
InputStream
for thefile
. - Throws:
IOException
- if something goes wrong while creating the stream for reading #file.
-
getSimpleValueOrRedactedPassword
-