edu.gtts.sautrela.engine.util
Class StreamCutter
java.lang.Object
edu.gtts.sautrela.engine.AbstractDataProcessor
edu.gtts.sautrela.engine.util.StreamCutter
- All Implemented Interfaces:
- DataProcessor, java.beans.BeanInfo, java.io.Serializable
public class StreamCutter
- extends AbstractDataProcessor
A simple processor that splits input data streams in fixed size streams.
The length is computed as number of Data elements (DataStream begin and end
are not computed), so vector Data such as IntData, ShortData and DoubleData
are computed as single elements, regardless of the size of the vector they
contain. Last (remainder) elements are filtered.
- Author:
- mpenagar
- See Also:
- Serialized Form
| Fields inherited from interface java.beans.BeanInfo |
ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32 |
|
Constructor Summary |
StreamCutter()
Creates a new instance of StreamCutter |
|
Method Summary |
void |
editBeanInfo(java.beans.BeanInfo info)
|
int |
getLength()
Getter for property length. |
static void |
main(java.lang.String[] args)
|
void |
process(Buffer in,
Buffer out)
Data is pulled from imput buffer, processed and pushed into the output
buffer. |
void |
setLength(int length)
Setter for property length. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
StreamCutter
public StreamCutter()
- Creates a new instance of StreamCutter
process
public void process(Buffer in,
Buffer out)
throws DataProcessorException
- Description copied from interface:
DataProcessor
- Data is pulled from imput buffer, processed and pushed into the output
buffer. Processing mus finish as sooan as a CloseData is received.
- Parameters:
in - Input Bufferout - Output Buffer
- Throws:
DataProcessorException
getLength
public int getLength()
- Getter for property length.
- Returns:
- Value of property length.
setLength
public void setLength(int length)
- Setter for property length.
- Parameters:
length - New value of property length.
editBeanInfo
public void editBeanInfo(java.beans.BeanInfo info)
- Overrides:
editBeanInfo in class AbstractDataProcessor
main
public static void main(java.lang.String[] args)
throws java.lang.Exception
- Throws:
java.lang.Exception