zinger.bsheet
Class FlatFilePersistence
java.lang.Object
zinger.bsheet.AbstractPersistence
zinger.bsheet.StandardMapPersistence
zinger.bsheet.StreamMapPersistence
zinger.bsheet.FlatFilePersistence
- All Implemented Interfaces:
- Persistence
public class FlatFilePersistence
- extends StreamMapPersistence
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
public static final FlatFilePersistence INSTANCE
commentChars
protected int[] commentChars
quoteChars
protected int[] quoteChars
eolIsSignificant
protected boolean eolIsSignificant
ordinaryChars
protected int[] ordinaryChars
slashSlashComments
protected boolean slashSlashComments
slashStarComments
protected boolean slashStarComments
rowDelimChars
protected int[] rowDelimChars
colDelimChars
protected int[] colDelimChars
FlatFilePersistence
protected FlatFilePersistence()
FlatFilePersistence
protected FlatFilePersistence(javax.swing.filechooser.FileFilter fileFilter,
java.lang.String[] extensions)
getCommentChars
public java.lang.CharSequence getCommentChars()
- Since:
- 1.0.5
setCommentChars
public void setCommentChars(java.lang.CharSequence commentChars)
- Since:
- 1.0.5
getQuoteChars
public java.lang.CharSequence getQuoteChars()
- Since:
- 1.0.5
setQuoteChars
public void setQuoteChars(java.lang.CharSequence quoteChars)
- Since:
- 1.0.5
isEOLSignificant
public boolean isEOLSignificant()
- Since:
- 1.0.5
setEOLSignificant
public void setEOLSignificant(boolean eolSignificant)
- Since:
- 1.0.5
getOrdinaryChars
public java.lang.CharSequence getOrdinaryChars()
- Since:
- 1.0.5
setOrdinaryChars
public void setOrdinaryChars(java.lang.CharSequence ordinaryChars)
- Since:
- 1.0.5
getSlashSlashComments
public boolean getSlashSlashComments()
- Since:
- 1.0.5
setSlashSlashComments
public void setSlashSlashComments(boolean slashSlashComments)
- Since:
- 1.0.5
getSlashStarComments
public boolean getSlashStarComments()
- Since:
- 1.0.5
setSlashStarComments
public void setSlashStarComments(boolean slashStarComments)
- Since:
- 1.0.5
getRowDelimChars
public java.lang.CharSequence getRowDelimChars()
- Since:
- 1.0.5
setRowDelimChars
public void setRowDelimChars(java.lang.CharSequence rowDelimChars)
- Since:
- 1.0.5
getColDelimChars
public java.lang.CharSequence getColDelimChars()
- Since:
- 1.0.5
setColDelimChars
public void setColDelimChars(java.lang.CharSequence colDelimChars)
- Since:
- 1.0.5
writeEscapedChars
public java.lang.CharSequence writeEscapedChars(int[] chars)
- Since:
- 1.0.5
readEscapedChars
public int[] readEscapedChars(java.lang.CharSequence escapedChars)
doPromptForParseSettings
protected boolean doPromptForParseSettings(java.awt.Component parent)
createTokenizer
protected java.io.StreamTokenizer createTokenizer(java.io.Reader r,
int[] quoteChars,
int[] whitespaceChars)
createRowTokenizer
protected java.io.StreamTokenizer createRowTokenizer(java.io.Reader r)
createColumnTokenizer
protected java.io.StreamTokenizer createColumnTokenizer(java.io.Reader r)
isQuote
protected boolean isQuote(int ttype)
- Since:
- 0.9.7
save
protected void save(java.util.Map map,
java.io.OutputStream os)
throws java.io.IOException
- Specified by:
save
in class StreamMapPersistence
- Throws:
java.io.IOException
load
protected java.util.Map load(java.io.InputStream is)
throws java.io.IOException
- Specified by:
load
in class StreamMapPersistence
- Throws:
java.io.IOException
save
public boolean save(javax.swing.JTable table,
java.io.File file)
throws java.io.IOException
- Prompts for parsing settings before calling superclass' implementation.
If the parse settings are canceled by the user returns
false
- Specified by:
save
in interface Persistence
- Overrides:
save
in class StandardMapPersistence
- Returns:
true
if the document was persisted successfully
- Throws:
java.io.IOException
- if an IO problem occurred during persisting the document
load
public boolean load(javax.swing.JTable table,
java.io.File file)
throws java.io.IOException,
java.lang.UnsupportedOperationException
- Prompts for parsing settings before calling superclass' implementation.
If the parse settings are canceled by the user returns
false
- Specified by:
load
in interface Persistence
- Overrides:
load
in class StandardMapPersistence
- Returns:
true
if the document was loaded successfully
- Throws:
java.io.IOException
- if an IO problem occurred during loading the document
java.lang.UnsupportedOperationException
- if the implementation is not capable of loading
documents as per isLoadCapable()
method- See Also:
Persistence.isLoadCapable()
save
protected java.util.Map save(javax.swing.JTable table)
- Overrides:
save
in class StandardMapPersistence