com.northconcepts.datapipeline.file
Class FileWriter

java.lang.Object
  extended by com.northconcepts.datapipeline.core.DataEndpoint
      extended by com.northconcepts.datapipeline.core.DataWriter
          extended by com.northconcepts.datapipeline.file.FileWriter

public class FileWriter
extends DataWriter

Writes records to a binary stream that can be later read using a FileReader.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.northconcepts.datapipeline.core.DataEndpoint
DataEndpoint.State
 
Field Summary
 
Fields inherited from class com.northconcepts.datapipeline.core.DataEndpoint
BUFFER_SIZE, log
 
Constructor Summary
FileWriter(DataOutput out)
           
FileWriter(File file)
           
 
Method Summary
 DataException addExceptionProperties(DataException exception)
          Adds this endpoint's current state to a DataException.
 void close()
          Indicates that this endpoint has finished reading or writing.
protected  void writeImpl(Record record)
          Overridden by subclasses to write the specified record to this DataWriter.
 
Methods inherited from class com.northconcepts.datapipeline.core.DataWriter
getNestedWriter, getRootWriter, write
 
Methods inherited from class com.northconcepts.datapipeline.core.DataEndpoint
assertNotOpened, assertOpened, decrementRecordCount, exception, exception, exception, finalize, getRecordCount, getRecordCountAsBigInteger, getRecordCountAsString, getState, incrementRecordCount, isClosed, isOpen, isRecordCountBigInteger, open, resetRecordCount, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileWriter

public FileWriter(File file)

FileWriter

public FileWriter(DataOutput out)
Method Detail

addExceptionProperties

public DataException addExceptionProperties(DataException exception)
Description copied from class: DataEndpoint
Adds this endpoint's current state to a DataException. Since this method is called whenever an exception is thrown, subclasses should override it to add their specific information.

Overrides:
addExceptionProperties in class DataWriter

close

public void close()
Description copied from class: DataEndpoint
Indicates that this endpoint has finished reading or writing.

Overrides:
close in class DataEndpoint

writeImpl

protected void writeImpl(Record record)
                  throws Throwable
Description copied from class: DataWriter
Overridden by subclasses to write the specified record to this DataWriter.

Specified by:
writeImpl in class DataWriter
Throws:
Throwable


Copyright (c) 2007-2009 North Concepts Inc. All Rights Reserved.