public class FilePrintStreamFactory extends java.lang.Object implements PrintStreamFactory
PrintStream
instances that write to a file identified by the
StoryLocation
. FilePrintStreamFactory.FileConfiguration
specifies directory and the
extension, providing useful default values.Modifier and Type | Class and Description |
---|---|
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 and Description |
---|
FilePrintStreamFactory(StoryLocation storyLocation) |
FilePrintStreamFactory(StoryLocation storyLocation,
FilePrintStreamFactory.FileConfiguration configuration) |
Modifier and Type | Method and Description |
---|---|
FilePrintStreamFactory.FileConfiguration |
configuration() |
java.io.PrintStream |
createPrintStream() |
java.io.File |
getOutputFile() |
protected java.io.File |
outputDirectory()
Return the file output directory, using the configured
FilePrintStreamFactory.FilePathResolver |
protected java.io.File |
outputFile() |
protected java.lang.String |
outputName()
Return the file output name, using the configured
FilePrintStreamFactory.FilePathResolver |
void |
useConfiguration(FilePrintStreamFactory.FileConfiguration configuration) |
public FilePrintStreamFactory(StoryLocation storyLocation)
public FilePrintStreamFactory(StoryLocation storyLocation, FilePrintStreamFactory.FileConfiguration configuration)
public java.io.PrintStream createPrintStream()
createPrintStream
in interface PrintStreamFactory
public java.io.File getOutputFile()
public void useConfiguration(FilePrintStreamFactory.FileConfiguration configuration)
public FilePrintStreamFactory.FileConfiguration configuration()
protected java.io.File outputFile()
protected java.io.File outputDirectory()
FilePrintStreamFactory.FilePathResolver
protected java.lang.String outputName()
FilePrintStreamFactory.FilePathResolver
Copyright © 2003-2014. All Rights Reserved.