Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Creates `PrintStream` instances that write to a file identified by the `StoryLocation`. `FilePrintStreamFactory.FileConfiguration` specifies directory and the extension, providing useful default values.

Nested Class Summary
`static class` | `FilePrintStreamFactory.AbstractPathResolver` Resolves directory from code location parent file.
`static class` | `FilePrintStreamFactory.FileConfiguration` Configuration class for file print streams.
`static interface` | `FilePrintStreamFactory.FilePathResolver`
`static class` | `FilePrintStreamFactory.FilePrintStream`
`class` | `FilePrintStreamFactory.PrintStreamCreationFailed`
`static class` | `FilePrintStreamFactory.ResolveToPackagedName` Resolves story location path to java packaged name, replacing '/' with '.'
`static class` | `FilePrintStreamFactory.ResolveToSimpleName` Resolves story location path to simple name, considering portion after last '/'.

Constructor Summary
`FilePrintStreamFactory(StoryLocation storyLocation)`
`FilePrintStreamFactory(StoryLocation storyLocation, FilePrintStreamFactory.FileConfiguration configuration)`

Method Summary
`FilePrintStreamFactory.FileConfiguration` | `configuration()`
`PrintStream` | `createPrintStream()`
`File` | `getOutputFile()`
`protected File` | `outputDirectory()` Return the file output directory, using the configured `FilePrintStreamFactory.FilePathResolver`
`protected File` | `outputFile()`
`protected String` | `outputName()` Return the file output name, using the configured `FilePrintStreamFactory.FilePathResolver`
`void` | `useConfiguration(FilePrintStreamFactory.FileConfiguration configuration)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### FilePrintStreamFactory

    public FilePrintStreamFactory(StoryLocation storyLocation)

### FilePrintStreamFactory

    public FilePrintStreamFactory(StoryLocation storyLocation,
                                  FilePrintStreamFactory.FileConfiguration configuration)

Method Detail

### createPrintStream

    public PrintStream createPrintStream()

  Specified by:
    `createPrintStream` in interface `PrintStreamFactory`

### 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 configured `FilePrintStreamFactory.FilePathResolver`

  Returns:
    The File representing the output directory

### outputName

    protected String outputName()

  Return the file output name, using the configured `FilePrintStreamFactory.FilePathResolver`

  Returns:
    The file output name

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2013. All Rights Reserved.