net.sf.filePiper.processors
Class HeadProcessor

java.lang.Object
  extended by net.sf.filePiper.model.OneToOneByteFileProcessor
      extended by net.sf.filePiper.processors.HeadProcessor
All Implemented Interfaces:
FileProcessor, SizeAndUnit

public class HeadProcessor
extends OneToOneByteFileProcessor
implements SizeAndUnit

Processor copying just the x first lines (or bytes) of a file.

Author:
BEROL

Field Summary
 
Fields inherited from interface net.sf.filePiper.processors.SizeAndUnit
UNIT_BYTE, UNIT_LINE
 
Fields inherited from interface net.sf.filePiper.model.FileProcessor
MANY, NONE, ONE
 
Constructor Summary
HeadProcessor()
           
 
Method Summary
 net.sf.sfac.gui.editor.ObjectEditor getEditor()
          Get a GUI editor for this object.
 String getProcessorName()
           
 String getProposedNameSuffix()
           
 int getSize()
           
 int getUnits()
           
 void process(InputStream is, OutputStream os, FileProcessorEnvironment env)
           
 void processBytes(InputStream is, OutputStream os, FileProcessorEnvironment env)
           
 void processLines(BufferedReader in, BufferedWriter out, FileProcessorEnvironment env)
           
 void setSize(int newSize)
           
 void setUnits(int newUnits)
           
 
Methods inherited from class net.sf.filePiper.model.OneToOneByteFileProcessor
bytesProcessed, endBatch, getCurrentInputFileInfo, getOutputCardinality, getProcessorDescription, getProposedExtension, getSettings, getStatusMessage, init, inputFileStarted, linesProcessed, process, setCurrentInputFileInfo, setProposedFilePath, startBatch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HeadProcessor

public HeadProcessor()
Method Detail

getProcessorName

public String getProcessorName()
Specified by:
getProcessorName in interface FileProcessor
Specified by:
getProcessorName in class OneToOneByteFileProcessor
Returns:
A displayable name for this processor.

getSize

public int getSize()
Specified by:
getSize in interface SizeAndUnit

setSize

public void setSize(int newSize)
Specified by:
setSize in interface SizeAndUnit

getUnits

public int getUnits()
Specified by:
getUnits in interface SizeAndUnit

setUnits

public void setUnits(int newUnits)
Specified by:
setUnits in interface SizeAndUnit

getProposedNameSuffix

public String getProposedNameSuffix()
Specified by:
getProposedNameSuffix in class OneToOneByteFileProcessor

process

public void process(InputStream is,
                    OutputStream os,
                    FileProcessorEnvironment env)
             throws IOException
Specified by:
process in class OneToOneByteFileProcessor
Throws:
IOException

processBytes

public void processBytes(InputStream is,
                         OutputStream os,
                         FileProcessorEnvironment env)
                  throws IOException
Throws:
IOException

processLines

public void processLines(BufferedReader in,
                         BufferedWriter out,
                         FileProcessorEnvironment env)
                  throws IOException
Throws:
IOException

getEditor

public net.sf.sfac.gui.editor.ObjectEditor getEditor()
Description copied from interface: FileProcessor
Get a GUI editor for this object.

Specified by:
getEditor in interface FileProcessor
Overrides:
getEditor in class OneToOneByteFileProcessor


Copyright © 2011. All Rights Reserved.