Package org.jbehave.core.reporters
Class FilePrintStreamFactory
- java.lang.Object
-
- org.jbehave.core.reporters.FilePrintStreamFactory
-
- All Implemented Interfaces:
PrintStreamFactory
public class FilePrintStreamFactory extends Object implements PrintStreamFactory
CreatesPrintStreaminstances that write to a file identified by theStoryLocation.FilePrintStreamFactory.FileConfigurationspecifies directory and the extension, providing useful default values.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFilePrintStreamFactory.AbstractPathResolverResolves directory from code location parent file.static classFilePrintStreamFactory.FileConfigurationConfiguration class for file print streams.static interfaceFilePrintStreamFactory.FilePathResolverstatic classFilePrintStreamFactory.FilePrintStreamclassFilePrintStreamFactory.PrintStreamCreationFailedstatic classFilePrintStreamFactory.ResolveToPackagedNameResolves story location path to java packaged name, replacing '/' with '.'static classFilePrintStreamFactory.ResolveToSimpleNameResolves story location path to simple name, considering portion after last '/'.
-
Constructor Summary
Constructors Constructor Description FilePrintStreamFactory(StoryLocation storyLocation)FilePrintStreamFactory(StoryLocation storyLocation, FilePrintStreamFactory.FileConfiguration configuration)
-
Method Summary
Modifier and Type Method Description FilePrintStreamFactory.FileConfigurationconfiguration()PrintStreamcreatePrintStream()FilegetOutputFile()protected FileoutputDirectory()Return the file output directory, using the configuredFilePrintStreamFactory.FilePathResolverprotected FileoutputFile()protected StringoutputName()Return the file output name, using the configuredFilePrintStreamFactory.FilePathResolvervoiduseConfiguration(FilePrintStreamFactory.FileConfiguration configuration)
-
-
-
Constructor Detail
-
FilePrintStreamFactory
public FilePrintStreamFactory(StoryLocation storyLocation)
-
FilePrintStreamFactory
public FilePrintStreamFactory(StoryLocation storyLocation, FilePrintStreamFactory.FileConfiguration configuration)
-
-
Method Detail
-
createPrintStream
public PrintStream createPrintStream()
- Specified by:
createPrintStreamin interfacePrintStreamFactory
-
getOutputFile
public File getOutputFile()
-
useConfiguration
public void useConfiguration(FilePrintStreamFactory.FileConfiguration configuration)
-
configuration
public FilePrintStreamFactory.FileConfiguration configuration()
-
outputFile
protected File outputFile()
-
outputDirectory
protected File outputDirectory()
Return the file output directory, using the configuredFilePrintStreamFactory.FilePathResolver- Returns:
- The File representing the output directory
-
outputName
protected String outputName()
Return the file output name, using the configuredFilePrintStreamFactory.FilePathResolver- Returns:
- The file output name
-
-