GXPARSE hosted by SourceForge.net Logo

ca.gorman.io
Class Resequencer.SpillBuffer

java.lang.Object
  extended by java.io.Writer
      extended by ca.gorman.io.Resequencer.SpillBuffer
All Implemented Interfaces:
Closeable, Flushable, Appendable
Enclosing interface:
Resequencer<K>

public abstract static class Resequencer.SpillBuffer
extends Writer

Overflow buffer for Buffer, when the amount of data exceeds the capacity of the fast buffer used by Buffer.


Field Summary
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
protected Resequencer.SpillBuffer()
           
 
Method Summary
abstract  void close()
           Close this SpillBuffer and make it ready to provide a reader.
 void flush()
           Unsupported operation.
abstract  Reader getReader()
           Get a Reader for the data held in the SpillBuffer at the time this method was invoked.
static Resequencer.SpillBuffer newInstance()
           Create a default SpillBuffer.
static Resequencer.SpillBuffer newInstance(File file)
           Create a SpillBuffer in a File.
 
Methods inherited from class java.io.Writer
append, append, append, write, write, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Resequencer.SpillBuffer

protected Resequencer.SpillBuffer()
Method Detail

newInstance

public static Resequencer.SpillBuffer newInstance()
                                           throws IOException

Create a default SpillBuffer.

Throws:
IOException

newInstance

public static Resequencer.SpillBuffer newInstance(File file)
                                           throws IOException

Create a SpillBuffer in a File. The File will be opened for writing, closed, opened for reading, and closed again.

Throws:
IOException

close

public abstract void close()
                    throws IOException

Close this SpillBuffer and make it ready to provide a reader.

Specified by:
close in interface Closeable
Specified by:
close in class Writer
Throws:
IOException

flush

public void flush()
           throws IOException

Unsupported operation.

Specified by:
flush in interface Flushable
Specified by:
flush in class Writer
Throws:
IOException

getReader

public abstract Reader getReader()
                          throws IOException

Get a Reader for the data held in the SpillBuffer at the time this method was invoked.

Throws:
IllegalStateException - if this Spillbuffer is not closed.
IOException

GXPARSE download

GXPARSE Generic XML Stream Parser API and supporting tools.   Release $Name: gxparse-sf-alpha-2_0 $
Copyright 2003-2004 Ian E. Gorman
Released under GNU Lesser General Public License