com.espertech.esperio.csv
Class CSVSource

java.lang.Object
  extended by com.espertech.esperio.csv.CSVSource

public class CSVSource
extends java.lang.Object

A wrapper for a Reader or an InputStream.


Constructor Summary
CSVSource(AdapterInputSource source)
          Ctor.
 
Method Summary
 void close()
          Close the underlying resource.
 boolean isResettable()
          Return true if the underlying resource is resettable.
 void mark(int readAheadLimit)
          Set the mark position.
 int read()
          Read from the underlying resource.
 void reset()
          Reset to the beginning of the resource.
 void resetToMark()
          Reset to the last mark position.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CSVSource

public CSVSource(AdapterInputSource source)
Ctor.

Parameters:
source - - the AdapterInputSource from which to obtain the uderlying resource
Method Detail

close

public void close()
           throws java.io.IOException
Close the underlying resource.

Throws:
java.io.IOException - to indicate an io error

read

public int read()
         throws java.io.IOException
Read from the underlying resource.

Returns:
the result of the read
Throws:
java.io.IOException - for io errors

isResettable

public boolean isResettable()
Return true if the underlying resource is resettable.

Returns:
true if resettable, false otherwise

resetToMark

public void resetToMark()
                 throws java.io.IOException
Reset to the last mark position.

Throws:
java.io.IOException - for io errors

mark

public void mark(int readAheadLimit)
          throws java.io.IOException
Set the mark position.

Parameters:
readAheadLimit - is the maximum number of read-ahead events
Throws:
java.io.IOException - when an io error occurs

reset

public void reset()
Reset to the beginning of the resource.


© 2006-2016 EsperTech Inc.
All rights reserved.
Visit us at espertech.com