Class AppleWorksWordProcessorFileFilter
- java.lang.Object
-
- com.webcodepro.applecommander.storage.filters.AppleWorksWordProcessorFileFilter
-
- All Implemented Interfaces:
FileFilter
public class AppleWorksWordProcessorFileFilter extends java.lang.Object implements FileFilter
Extract the contents of an AWP (AppleWorks word processor) document and convert to a text format. Currently supported formats are plain text, HTML, or RTF. These are not exact duplicates, but they are close approximations. RTF format is suitable for conversion to other word processors.To choose export format, use the appropriately named select method.
See AWP format documentation at: http://www.gno.org/pub/apple2/doc/apple/filetypes/ftn.1a.xxxx
Date created: Nov 15, 2002 3:55:21 PM
-
-
Constructor Summary
Constructors Constructor Description AppleWorksWordProcessorFileFilter()Constructor for AppleWorksWordProcessorFileFilter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]filter(FileEntry fileEntry)Process the given FileEntry and return a byte array with filtered data.java.lang.StringgetSuggestedFileName(FileEntry fileEntry)Give suggested file name.protected inthandleCommandRecordAsHtml(int byte0, int byte1, java.io.PrintWriter printWriter, int offset)Deal with an individual command line record.protected inthandleCommandRecordAsRtf(int byte0, int byte1, java.io.PrintWriter printWriter, int offset)Deal with an individual command line record.protected inthandleCommandRecordAsText(int byte0, int byte1, java.io.PrintWriter printWriter, int offset)Deal with an individual command line record.protected voidhandleReturn(java.io.PrintWriter printWriter)Deal with carriage-return.protected voidhandleSpecialCodesAsHtml(java.io.PrintWriter printWriter, byte ch)Process special coding of a text record.protected voidhandleSpecialCodesAsRtf(java.io.PrintWriter printWriter, byte ch)Process special coding of a text record.protected voidhandleSpecialCodesAsText(java.io.PrintWriter printWriter, byte ch)Process special coding of a text record.protected inthandleTextRecord(byte[] fileData, java.io.PrintWriter printWriter, int offset)Deal with an individual text record.booleanisHtmlRendering()Indicates if this is an HTML rendering.booleanisRtfRendering()Indicates if this is an RTF rendering.booleanisTextRendering()Indicates if this is a text rendering.voidselectHtmlRendering()Selects the HTML rendering engine.voidselectRtfRendering()Selects the RTF rendering engine.voidselectTextRendering()Selects the text rendering engine.protected voidsetRendering(int rendering)Set the rendering method.
-
-
-
Method Detail
-
filter
public byte[] filter(FileEntry fileEntry)
Process the given FileEntry and return a byte array with filtered data.- Specified by:
filterin interfaceFileFilter- See Also:
FileFilter.filter(FileEntry)
-
handleTextRecord
protected int handleTextRecord(byte[] fileData, java.io.PrintWriter printWriter, int offset)Deal with an individual text record.
-
handleReturn
protected void handleReturn(java.io.PrintWriter printWriter)
Deal with carriage-return.
-
handleSpecialCodesAsHtml
protected void handleSpecialCodesAsHtml(java.io.PrintWriter printWriter, byte ch)Process special coding of a text record.
-
handleSpecialCodesAsRtf
protected void handleSpecialCodesAsRtf(java.io.PrintWriter printWriter, byte ch)Process special coding of a text record.
-
handleSpecialCodesAsText
protected void handleSpecialCodesAsText(java.io.PrintWriter printWriter, byte ch)Process special coding of a text record.
-
handleCommandRecordAsHtml
protected int handleCommandRecordAsHtml(int byte0, int byte1, java.io.PrintWriter printWriter, int offset)Deal with an individual command line record.
-
handleCommandRecordAsRtf
protected int handleCommandRecordAsRtf(int byte0, int byte1, java.io.PrintWriter printWriter, int offset)Deal with an individual command line record.
-
handleCommandRecordAsText
protected int handleCommandRecordAsText(int byte0, int byte1, java.io.PrintWriter printWriter, int offset)Deal with an individual command line record.
-
getSuggestedFileName
public java.lang.String getSuggestedFileName(FileEntry fileEntry)
Give suggested file name.- Specified by:
getSuggestedFileNamein interfaceFileFilter- See Also:
FileFilter.getSuggestedFileName(FileEntry)
-
setRendering
protected void setRendering(int rendering)
Set the rendering method.
-
isTextRendering
public boolean isTextRendering()
Indicates if this is a text rendering.
-
isHtmlRendering
public boolean isHtmlRendering()
Indicates if this is an HTML rendering.
-
isRtfRendering
public boolean isRtfRendering()
Indicates if this is an RTF rendering.
-
selectTextRendering
public void selectTextRendering()
Selects the text rendering engine.
-
selectHtmlRendering
public void selectHtmlRendering()
Selects the HTML rendering engine.
-
selectRtfRendering
public void selectRtfRendering()
Selects the RTF rendering engine.
-
-