com.northconcepts.datapipeline.memory
Class MemoryReader

java.lang.Object
  extended by com.northconcepts.datapipeline.core.DataEndpoint
      extended by com.northconcepts.datapipeline.core.DataReader
          extended by com.northconcepts.datapipeline.memory.MemoryReader

public class MemoryReader
extends DataReader

Obtains records from an in-memory RecordList.


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
MemoryReader(RecordList recordSet)
           
 
Method Summary
 int available()
          Returns the number of records that can probably be read without blocking.
 RecordList getRecordList()
           
 void open()
          Makes this endpoint ready for reading or writing.
protected  Record readImpl()
          Overridden by subclasses to read the next record from this DataReader.
 
Methods inherited from class com.northconcepts.datapipeline.core.DataReader
addExceptionProperties, getBufferSize, getNestedReader, getRootReader, peek, pop, push, read, skip
 
Methods inherited from class com.northconcepts.datapipeline.core.DataEndpoint
assertNotOpened, assertOpened, close, decrementRecordCount, exception, exception, exception, finalize, getRecordCount, getRecordCountAsBigInteger, getRecordCountAsString, getState, incrementRecordCount, isClosed, isOpen, isRecordCountBigInteger, resetRecordCount, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MemoryReader

public MemoryReader(RecordList recordSet)
Method Detail

getRecordList

public RecordList getRecordList()

open

public void open()
Description copied from class: DataEndpoint
Makes this endpoint ready for reading or writing.

Overrides:
open in class DataEndpoint

readImpl

protected Record readImpl()
                   throws Throwable
Description copied from class: DataReader
Overridden by subclasses to read the next record from this DataReader.

If no record is available, null will be returned.

Specified by:
readImpl in class DataReader
Throws:
Throwable

available

public int available()
Description copied from class: DataReader
Returns the number of records that can probably be read without blocking.

Overrides:
available in class DataReader


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