Java Doc for FileOutputHandler.java in  » RSS-RDF » curn » org » clapper » curn » output » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » RSS RDF » curn » org.clapper.curn.output 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.clapper.curn.output.FileOutputHandler

All known Subclasses:   org.clapper.curn.output.script.ScriptOutputHandler,  org.clapper.curn.output.freemarker.FreeMarkerOutputHandler,
FileOutputHandler
abstract public class FileOutputHandler implements OutputHandler(Code)

FileOutputHandler is an abstract base class for OutputHandler subclasses that write RSS feed summaries to a file. It consolidates common logic and configuration handling for such classes, providing both consistent implementation and configuration.
See Also:   OutputHandler
See Also:   org.clapper.curn.Curn
See Also:   org.clapper.curn.parser.RSSChannel
version:
   $Revision: 7041 $



Field Summary
final public static  StringCFG_ENCODING
    
final public static  StringCFG_SAVED_BACKUPS
     Number of backups of saved files to keep.
final public static  StringCFG_SAVE_AS
    
final public static  StringCFG_SAVE_ONLY
    
final public static  StringCFG_SHOW_CURN_INFO
    

Constructor Summary
public  FileOutputHandler()
    

Method Summary
protected  voidcopySubclassFields(FileOutputHandler theCopy)
     Copy any subclass fields into a copy of this output handler.
abstract public  voiddisplayChannel(RSSChannel channel, FeedInfo feedInfo)
     Display the list of RSSItem news items to whatever output is defined for the underlying class.
final protected  booleandisplayToolInfo()
     Determine whether or not to display curn tool-related information in the generated output.
abstract public  voidflush()
     Flush any buffered-up output.
abstract public  StringgetContentType()
     Get the content (i.e., MIME) type for output produced by this output handler.
final public  FilegetGeneratedOutput()
     Get the File that represents the output produced by the handler, if applicable.
public  StringgetName()
     Get the name of this output handler.
public  StringgetOutputEncoding()
     Get the output encoding.
final protected  FilegetOutputFile()
     Get the output file.
final public  booleanhasGeneratedOutput()
     Determine whether this handler has produced any actual output (i.e., whether FileOutputHandler.getGeneratedOutput() will return a non-null File if called).
final public  voidinit(CurnConfig config, ConfiguredOutputHandler cfgHandler)
     Initializes the output handler for another set of RSS channels.
abstract public  voidinitOutputHandler(CurnConfig config, ConfiguredOutputHandler cfgHandler)
     Perform any subclass-specific initialization.
final public  OutputHandlermakeCopy()
     Make a copy of the output handler.
protected  PrintWriteropenOutputFile()
     Open the output file, returning a PrintWriter.
final protected  booleansavingOutputOnly()
     Determine whether the handler is saving output only, or also reporting output to curn.
public  voidsetName(String name)
     Set the name of this output handler.
final protected  voidsetOutputEncoding(String newEncoding)
     Override the encoding specified by the FileOutputHandler.CFG_ENCODING configuration parameter.

Field Detail
CFG_ENCODING
final public static String CFG_ENCODING(Code)
Configuration variable: encoding



CFG_SAVED_BACKUPS
final public static String CFG_SAVED_BACKUPS(Code)
Number of backups of saved files to keep.



CFG_SAVE_AS
final public static String CFG_SAVE_AS(Code)
Where to save the output, if any



CFG_SAVE_ONLY
final public static String CFG_SAVE_ONLY(Code)
Whether we're ONLY saving output



CFG_SHOW_CURN_INFO
final public static String CFG_SHOW_CURN_INFO(Code)
Whether or not to show curn information




Constructor Detail
FileOutputHandler
public FileOutputHandler()(Code)
Construct a new FileOutputHandler




Method Detail
copySubclassFields
protected void copySubclassFields(FileOutputHandler theCopy)(Code)
Copy any subclass fields into a copy of this output handler. Default version of this method does nothing.
Parameters:
  theCopy - copy of this class
throws:
  CurnException - on error



displayChannel
abstract public void displayChannel(RSSChannel channel, FeedInfo feedInfo) throws CurnException(Code)
Display the list of RSSItem news items to whatever output is defined for the underlying class. Output should be written to the PrintWriter that was passed to the FileOutputHandler.init init() method.
Parameters:
  channel - The parsed channel data
Parameters:
  feedInfo - The feed.
throws:
  CurnException - unable to write output



displayToolInfo
final protected boolean displayToolInfo()(Code)
Determine whether or not to display curn tool-related information in the generated output. Subclasses are not required to display tool-related information in the generated output, but if they do, they are strongly encouraged to do so conditionally, based on the value of this configuration item. true if tool-related information is to be displayed(assuming the output handler supports it), or falseif tool-related information should be suppressed.



flush
abstract public void flush() throws CurnException(Code)
Flush any buffered-up output.
throws:
  CurnException - unable to write output



getContentType
abstract public String getContentType()(Code)
Get the content (i.e., MIME) type for output produced by this output handler. the content type



getGeneratedOutput
final public File getGeneratedOutput() throws CurnException(Code)
Get the File that represents the output produced by the handler, if applicable. (Use of a File, rather than an InputStream, is more efficient when mailing the output, since the email API ultimately wants files and will create temporary files for InputStreams.) the output file, or null if no suitable output was produced
throws:
  CurnException - an error occurred



getName
public String getName()(Code)
Get the name of this output handler. The name must be unique. the name



getOutputEncoding
public String getOutputEncoding()(Code)
Get the output encoding. the encoding



getOutputFile
final protected File getOutputFile()(Code)
Get the output file. the output file, or none if not created yet



hasGeneratedOutput
final public boolean hasGeneratedOutput()(Code)
Determine whether this handler has produced any actual output (i.e., whether FileOutputHandler.getGeneratedOutput() will return a non-null File if called). true if the handler has produced output,false if not
See Also:   FileOutputHandler.getGeneratedOutput
See Also:   FileOutputHandler.getContentType



init
final public void init(CurnConfig config, ConfiguredOutputHandler cfgHandler) throws ConfigurationException, CurnException(Code)
Initializes the output handler for another set of RSS channels.
Parameters:
  config - the parsed curn configuration data
Parameters:
  cfgHandler - the ConfiguredOutputHandler wrappercontaining this object; the wrapper has some usefulmetadata, such as the object's configuration sectionname and extra variables.
throws:
  ConfigurationException - configuration error
throws:
  CurnException - some other initialization error



initOutputHandler
abstract public void initOutputHandler(CurnConfig config, ConfiguredOutputHandler cfgHandler) throws ConfigurationException, CurnException(Code)
Perform any subclass-specific initialization. Subclasses must override this method.
Parameters:
  config - the parsed curn configuration data
Parameters:
  cfgHandler - the ConfiguredOutputHandler wrappercontaining this object; the wrapper has some usefulmetadata, such as the object's configuration sectionname and extra variables.
throws:
  ConfigurationException - configuration error
throws:
  CurnException - some other initialization error



makeCopy
final public OutputHandler makeCopy() throws CurnException(Code)
Make a copy of the output handler. a clean, initialized copy of the output handler
throws:
  CurnException - on error



openOutputFile
protected PrintWriter openOutputFile() throws CurnException(Code)
Open the output file, returning a PrintWriter. Handles whether or not to roll the saved file, etc. the PrintWriter
throws:
  CurnException - unable to open file



savingOutputOnly
final protected boolean savingOutputOnly()(Code)
Determine whether the handler is saving output only, or also reporting output to curn. true if saving output only, false if alsoreporting File.createTempFile("curn", null);outputFile.deleteOnExit();output to curn



setName
public void setName(String name) throws CurnException(Code)
Set the name of this output handler. Called by curn.
Parameters:
  name - the name
throws:
  CurnException - on error



setOutputEncoding
final protected void setOutputEncoding(String newEncoding)(Code)
Override the encoding specified by the FileOutputHandler.CFG_ENCODING configuration parameter. To have any effect, this method must be called before FileOutputHandler.openOutputFile
Parameters:
  newEncoding - the new encoding, or null to use the default
See Also:   FileOutputHandler.getOutputEncoding



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.