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
FieldsModifier and TypeFieldDescriptionprotected com.cloudbees.jenkins.support.api.BaseFileContentprotected final File -
Constructor Summary
ConstructorsConstructorDescriptionFileContent(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 InputStreamInstantiates theInputStreamfor thefile.protected StringlonggetTime()voidwriteTo(OutputStream os) voidwriteTo(OutputStream os, ContentFilter filter) Write the component in the bundle filtering the contentMethods inherited from class com.cloudbees.jenkins.support.filter.PrefilteredContent
shouldBeFilteredMethods 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:
writeToin classContent- Throws:
IOException
-
writeTo
Description copied from class:PrefilteredContentWrite the component in the bundle filtering the content- Specified by:
writeToin 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 theInputStreamfor thefile.- Returns:
- the
InputStreamfor thefile. - Throws:
IOException- if something goes wrong while creating the stream for reading #file.
-
getSimpleValueOrRedactedPassword
-