public abstract class IOFilter
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
compressed
Indicates file compression.
|
protected java.io.File |
file
The IO file.
|
protected java.lang.Object |
parser
The file parser.
|
protected int |
streamSize
The number of patterns read in a single stream event.
|
protected java.io.Writer |
writer
The file writer.
|
| Constructor and Description |
|---|
IOFilter()
Constructs the plain filter without IO file.
|
IOFilter(java.io.File file)
Constructs the filter with IO file.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.io.InputStream |
createInputStream()
Creates an input stream for reading from data file.
|
protected java.io.OutputStream |
createOutputStream()
Creates an output stream for writing to data file.
|
java.io.File |
getFile()
Returns the IO file.
|
int |
getStreamSize()
Returns the number of patterns read in a single stream event.
|
boolean |
isCompressed()
Returns the file compression flag.
|
boolean |
isStreaming()
Indicates, if the filter is streaming data.
|
abstract Storable |
load(Storable container)
Loads data from a file to a data container.
|
protected java.util.List<java.lang.Double> |
readValues(StreamParser parser,
int count,
char separator,
java.util.List<java.lang.Double> values)
Reads 'count' double values from a pattern file.
|
void |
reset()
Resets the filter to an initial state.
|
abstract void |
save(Storable storable)
Saves Boone data to a file.
|
void |
setCompressed(boolean compressed)
Sets the file compression flag.
|
void |
setFile(java.io.File file)
Sets the IO file.
|
protected java.io.File file
protected boolean compressed
protected java.lang.Object parser
protected java.io.Writer writer
protected int streamSize
public IOFilter()
public IOFilter(java.io.File file)
file - the file to read or write datapublic void reset()
public java.io.File getFile()
public void setFile(java.io.File file)
reset().file - the IO filepublic boolean isCompressed()
public void setCompressed(boolean compressed)
compressed - true, if compressionpublic int getStreamSize()
public boolean isStreaming()
protected java.util.List<java.lang.Double> readValues(StreamParser parser, int count, char separator, java.util.List<java.lang.Double> values) throws java.io.IOException
parser - the parsercount - the number of values to readseparator - the character separating the valuesvalues - a container for the values, if null it is createdjava.io.IOException - if the file format is incorrectprotected java.io.InputStream createInputStream()
throws java.io.IOException
java.io.IOExceptionprotected java.io.OutputStream createOutputStream()
throws java.io.IOException
java.io.IOExceptionpublic abstract Storable load(Storable container) throws java.io.IOException
container - the data containerjava.io.IOExceptionpublic abstract void save(Storable storable) throws java.io.IOException
storable - a Storablejava.io.IOException - problems when writing