Class UnfilteredFileContent
- java.lang.Object
-
- com.cloudbees.jenkins.support.api.Content
-
- com.cloudbees.jenkins.support.api.UnfilteredFileContent
-
public class UnfilteredFileContent extends Content
Content that is stored as a file on disk and is not filtered. If you want the content to be filtered, use theFileContent
class.- Author:
- Stephen Connolly, M Ramón León
-
-
Constructor Summary
Constructors Constructor Description UnfilteredFileContent(String name, File file)
UnfilteredFileContent(String name, File file, long maxSize)
UnfilteredFileContent(String name, String[] filterableParameters, File file)
UnfilteredFileContent(String name, String[] filterableParameters, File file, long maxSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected InputStream
getInputStream()
Instantiates theInputStream
for thefile
.long
getTime()
boolean
shouldBeFiltered()
Indicates if this Content should be filtered when anonymization is enabled.void
writeTo(OutputStream os)
-
Methods inherited from class com.cloudbees.jenkins.support.api.Content
getFilterableParameters, getName
-
-
-
-
Field Detail
-
file
protected final File file
-
-
Method Detail
-
writeTo
public void writeTo(OutputStream os) throws IOException
- Specified by:
writeTo
in classContent
- Throws:
IOException
-
getTime
public long getTime() throws IOException
- Overrides:
getTime
in classContent
- Throws:
IOException
-
getInputStream
protected InputStream getInputStream() throws IOException
Instantiates theInputStream
for thefile
.- Returns:
- the
InputStream
for thefile
. - Throws:
IOException
- if something goes wrong while creating the stream for reading #file.
-
shouldBeFiltered
public boolean shouldBeFiltered()
Description copied from class:Content
Indicates if this Content should be filtered when anonymization is enabled. Whentrue
, the contents written viaContent.writeTo(OutputStream)
may be filtered by aContentFilter
. Whenfalse
, the contents are written without any filtering applied.- Overrides:
shouldBeFiltered
in classContent
-
-