com.webcodepro.applecommander.storage.filters
Class AppleWorksSpreadSheetFileFilter

java.lang.Object
  extended by com.webcodepro.applecommander.storage.filters.AppleWorksSpreadSheetFileFilter
All Implemented Interfaces:
FileFilter

public class AppleWorksSpreadSheetFileFilter
extends java.lang.Object
implements FileFilter

Export an AppleWorks SpreadSheet file. The spread-sheet file starts with a 300 byte header, followed by multiple cells.

See: http://www.gno.org/pub/apple2/doc/apple/filetypes/ftn.1b.xxxx

Date Created: Feb 23, 2003

Author:
Rob Greene

Constructor Summary
AppleWorksSpreadSheetFileFilter()
           
 
Method Summary
 byte[] filter(FileEntry fileEntry)
          Process the given FileEntry and return a byte array with filtered data.
protected  java.lang.String getColumnReference(int column)
          Build a column reference (convert to A or whatever it should be).
protected  java.lang.String getRowReference(int row)
          Build a row reference.
 java.lang.String getSuggestedFileName(FileEntry fileEntry)
          Give suggested file name.
protected  void processCell(java.io.PrintWriter printWriter, byte[] fileData, int offset, int length, int currentRow, int currentColumn)
          Process an individual cell.
 void processRow(java.io.PrintWriter printWriter, byte[] fileData, int offset, int rowNumber)
          Process an entire row.
protected  void skipColumns(int column, java.io.PrintWriter printWriter, int columns)
          Skip the given number of columns.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AppleWorksSpreadSheetFileFilter

public AppleWorksSpreadSheetFileFilter()
Method Detail

filter

public byte[] filter(FileEntry fileEntry)
Process the given FileEntry and return a byte array with filtered data.

Specified by:
filter in interface FileFilter
See Also:
FileFilter.filter(FileEntry)

getSuggestedFileName

public java.lang.String getSuggestedFileName(FileEntry fileEntry)
Give suggested file name.

Specified by:
getSuggestedFileName in interface FileFilter
See Also:
FileFilter.getSuggestedFileName(FileEntry)

processRow

public void processRow(java.io.PrintWriter printWriter,
                       byte[] fileData,
                       int offset,
                       int rowNumber)
Process an entire row.


skipColumns

protected void skipColumns(int column,
                           java.io.PrintWriter printWriter,
                           int columns)
Skip the given number of columns.


processCell

protected void processCell(java.io.PrintWriter printWriter,
                           byte[] fileData,
                           int offset,
                           int length,
                           int currentRow,
                           int currentColumn)
Process an individual cell.


getColumnReference

protected java.lang.String getColumnReference(int column)
Build a column reference (convert to A or whatever it should be).


getRowReference

protected java.lang.String getRowReference(int row)
Build a row reference.