csheets.io
Class CSVCodec

java.lang.Object
  extended by csheets.io.CSVCodec
All Implemented Interfaces:
Codec

public class CSVCodec
extends Object
implements Codec

A codec for comma-separated files.

Author:
Einar Pehrson

Field Summary
static String SEPARATOR
          The string used to separate the content of different cells
 
Constructor Summary
CSVCodec()
          Creates a new CSV codec.
 
Method Summary
 Workbook read(InputStream stream)
          Reads a workbook from the given input stream.
 void write(Workbook workbook, OutputStream stream)
          Writes a workbook to the given output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SEPARATOR

public static final String SEPARATOR
The string used to separate the content of different cells

See Also:
Constant Field Values
Constructor Detail

CSVCodec

public CSVCodec()
Creates a new CSV codec.

Method Detail

read

public Workbook read(InputStream stream)
              throws IOException
Description copied from interface: Codec
Reads a workbook from the given input stream.

Specified by:
read in interface Codec
Parameters:
stream - the input stream from which the workbook should be read
Throws:
IOException - if the workbook could not be read correctly

write

public void write(Workbook workbook,
                  OutputStream stream)
           throws IOException
Description copied from interface: Codec
Writes a workbook to the given output stream.

Specified by:
write in interface Codec
stream - the output stream to which the workbook should be written
Throws:
IOException - if the workbook could not be written correctly