Java Doc for CSVPrint.java in  » Template-Engine » ostermillerutils » com » Ostermiller » util » 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 » Template Engine » ostermillerutils » com.Ostermiller.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.Ostermiller.util.CSVPrint

All known Subclasses:   com.Ostermiller.util.ExcelCSVPrinter,  com.Ostermiller.util.CSVPrinter,
CSVPrint
public interface CSVPrint (Code)
Print values as a comma separated list. More information about this class is available from ostermiller.org. This interface is designed to be set of general methods that all CSV printers should implement.
author:
   Stephen Ostermiller http://ostermiller.org/contact.pl?regarding=Java+Utilities
author:
   Pierre Dittgen
since:
   ostermillerutils 1.00.00




Method Summary
public  voidchangeDelimiter(char newDelimiter)
     Change this printer so that it uses a new delimiter.
public  voidchangeQuote(char newQuote)
     Change this printer so that it uses a new character for quoting.
public  booleancheckError()
     Flush the stream if it's not closed and check its error state.
public  voidclose()
     Close any underlying streams.
public  voidflush()
     Flush any data written out to underlying streams.
public  voidprint(String value)
     Print the string as the next value on the line. The value will be quoted if needed.

This method never throws an I/O exception.

public  voidprint(String[] values)
     Print multiple delimited values values. The values will be quoted if needed.
public  voidprintln(String value)
     Print the string as the last value on the line. The value will be quoted if needed.
public  voidprintln()
     Output a blank line.

This method never throws an I/O exception.

public  voidprintln(String[] values)
     Print a single line of comma separated values. The values will be quoted if needed.
public  voidprintln(String[][] values)
     Print several lines of comma separated values. The values will be quoted if needed.
public  voidprintlnComment(String comment)
     If the CSV format supports comments, write the comment to the file on its own line, otherwise, start a new line.

This method never throws an I/O exception.

public  voidsetAlwaysQuote(boolean alwaysQuote)
     Set whether values printers should always be quoted, or whether the printer may, at its discretion, omit quotes around the value.
public  voidsetAutoFlush(boolean autoFlush)
     Set flushing behavior.
public  voidwrite(String value)
     Print the string as the next value on the line. The value will be quoted if needed.
public  voidwrite(String[] values)
     Print multiple delimited values values. The values will be quoted if needed.
public  voidwriteln(String value)
     Print the string as the last value on the line. The value will be quoted if needed.
public  voidwriteln()
     Output a blank line.
public  voidwriteln(String[] values)
     Print a single line of comma separated values. The values will be quoted if needed.
public  voidwriteln(String[][] values)
     Print several lines of comma separated values. The values will be quoted if needed.
public  voidwritelnComment(String comment)
     If the CSV format supports comments, write the comment to the file on its own line, otherwise, start a new line.



Method Detail
changeDelimiter
public void changeDelimiter(char newDelimiter) throws BadDelimiterException(Code)
Change this printer so that it uses a new delimiter.
Parameters:
  newDelimiter - The new delimiter character to use.
throws:
  BadDelimiterException - if the character cannot be used as a delimiter.
author:
   Pierre Dittgen
since:
   ostermillerutils 1.02.18



changeQuote
public void changeQuote(char newQuote) throws BadQuoteException(Code)
Change this printer so that it uses a new character for quoting.
Parameters:
  newQuote - The new character to use for quoting.
throws:
  BadQuoteException - if the character cannot be used as a quote.
author:
   Pierre Dittgen
since:
   ostermillerutils 1.02.18



checkError
public boolean checkError()(Code)
Flush the stream if it's not closed and check its error state. Errors are cumulative; once the stream encounters an error, this routine will return true on all successive calls. True if the print stream has encountered an error,either on the underlying output stream or during a format conversion.
since:
   ostermillerutils 1.02.26



close
public void close() throws IOException(Code)
Close any underlying streams.
throws:
  IOException - if an IO error occurs
since:
   ostermillerutils 1.02.26



flush
public void flush() throws IOException(Code)
Flush any data written out to underlying streams.
throws:
  IOException - if an IO error occurs
since:
   ostermillerutils 1.02.26



print
public void print(String value)(Code)
Print the string as the next value on the line. The value will be quoted if needed.

This method never throws an I/O exception. The client may inquire as to whether any errors have occurred by invoking checkError(). If an I/O Exception is desired, the client should use the corresponding println method.
Parameters:
  value - value to be outputted.
since:
   ostermillerutils 1.00.00




print
public void print(String[] values)(Code)
Print multiple delimited values values. The values will be quoted if needed. Quotes and and other characters that need it will be escaped.

This method never throws an I/O exception. The client may inquire as to whether any errors have occurred by invoking checkError(). If an I/O Exception is desired, the client should use the corresponding write method.
Parameters:
  values - values to be outputted.
since:
   ostermillerutils 1.02.26




println
public void println(String value)(Code)
Print the string as the last value on the line. The value will be quoted if needed. If value is null, an empty value is printed.

This method never throws an I/O exception. The client may inquire as to whether any errors have occurred by invoking checkError(). If an I/O Exception is desired, the client should use the corresponding writeln method.
Parameters:
  value - value to be outputted.
since:
   ostermillerutils 1.00.00




println
public void println()(Code)
Output a blank line.

This method never throws an I/O exception. The client may inquire as to whether any errors have occurred by invoking checkError(). If an I/O Exception is desired, the client should use the corresponding writeln method.
since:
   ostermillerutils 1.00.00




println
public void println(String[] values)(Code)
Print a single line of comma separated values. The values will be quoted if needed. Quotes and and other characters that need it will be escaped.

This method never throws an I/O exception. The client may inquire as to whether any errors have occurred by invoking checkError(). If an I/O Exception is desired, the client should use the corresponding writeln method.
Parameters:
  values - values to be outputted.
since:
   ostermillerutils 1.00.00




println
public void println(String[][] values)(Code)
Print several lines of comma separated values. The values will be quoted if needed. Quotes and newLine characters will be escaped.

This method never throws an I/O exception. The client may inquire as to whether any errors have occurred by invoking checkError(). If an I/O Exception is desired, the client should use the corresponding writeln method.
Parameters:
  values - values to be outputted.
since:
   ostermillerutils 1.00.00




printlnComment
public void printlnComment(String comment)(Code)
If the CSV format supports comments, write the comment to the file on its own line, otherwise, start a new line.

This method never throws an I/O exception. The client may inquire as to whether any errors have occurred by invoking checkError(). If an I/O Exception is desired, the client should use the corresponding writelnComment method.
Parameters:
  comment - the comment to output.
since:
   ostermillerutils 1.00.00




setAlwaysQuote
public void setAlwaysQuote(boolean alwaysQuote)(Code)
Set whether values printers should always be quoted, or whether the printer may, at its discretion, omit quotes around the value.
Parameters:
  alwaysQuote - true if quotes should be used even when not strictly needed.
since:
   ostermillerutils 1.02.26



setAutoFlush
public void setAutoFlush(boolean autoFlush)(Code)
Set flushing behavior. Iff set, a flush command will be issued to any underlying stream after each print or write command.
Parameters:
  autoFlush - should auto flushing be enabled.
since:
   ostermillerutils 1.02.26



write
public void write(String value) throws IOException(Code)
Print the string as the next value on the line. The value will be quoted if needed.
Parameters:
  value - value to be outputted.
throws:
  IOException - if an error occurs while writing.
since:
   ostermillerutils 1.02.26



write
public void write(String[] values) throws IOException(Code)
Print multiple delimited values values. The values will be quoted if needed. Quotes and and other characters that need it will be escaped.
Parameters:
  values - values to be outputted.
throws:
  IOException - if an error occurs while writing.
since:
   ostermillerutils 1.02.26



writeln
public void writeln(String value) throws IOException(Code)
Print the string as the last value on the line. The value will be quoted if needed. If value is null, an empty value is printed.
Parameters:
  value - value to be outputted.
throws:
  IOException - if an error occurs while writing.
since:
   ostermillerutils 1.02.26



writeln
public void writeln() throws IOException(Code)
Output a blank line.
throws:
  IOException - if an error occurs while writing.
since:
   ostermillerutils 1.02.26



writeln
public void writeln(String[] values) throws IOException(Code)
Print a single line of comma separated values. The values will be quoted if needed. Quotes and and other characters that need it will be escaped.
Parameters:
  values - values to be outputted.
throws:
  IOException - if an error occurs while writing.
since:
   ostermillerutils 1.02.26



writeln
public void writeln(String[][] values) throws IOException(Code)
Print several lines of comma separated values. The values will be quoted if needed. Quotes and newLine characters will be escaped.
Parameters:
  values - values to be outputted.
throws:
  IOException - if an error occurs while writing.
since:
   ostermillerutils 1.02.26



writelnComment
public void writelnComment(String comment) throws IOException(Code)
If the CSV format supports comments, write the comment to the file on its own line, otherwise, start a new line.
Parameters:
  comment - the comment to output.
throws:
  IOException - if an error occurs while writing.
since:
   ostermillerutils 1.02.26



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