xxl.io
Class RandomAccessFileQueue

java.lang.Object
  |
  +--xxl.collections.AbstractQueue
        |
        +--xxl.io.StreamQueue
              |
              +--xxl.io.RandomAccessFileQueue

public class RandomAccessFileQueue
extends StreamQueue


Field Summary
static Function FACTORY_METHOD
          A factory method to create a new RandomAccessFileQueue.
protected  java.io.File file
           
protected  java.io.RandomAccessFile randomAccessFile
           
protected  long readOffset
           
 
Fields inherited from class xxl.io.StreamQueue
converter, dataInputStream, dataOutputStream, FACTORY_METHOD, inputBufferSize, newObject, outputBufferSize, size
 
Fields inherited from class xxl.collections.AbstractQueue
FACTORY_METHOD
 
Constructor Summary
RandomAccessFileQueue(java.io.File file, Converter converter, Function newObject, Function inputBufferSize, Function outputBufferSize)
           
RandomAccessFileQueue(java.io.File file, Converter converter, Function newObject, Function inputBufferSize, Function outputBufferSize, java.util.Iterator iterator)
           
RandomAccessFileQueue(java.io.File file, Function newObject, Function inputBufferSize, Function outputBufferSize)
           
RandomAccessFileQueue(java.io.File file, Function newObject, Function inputBufferSize, Function outputBufferSize, java.util.Iterator iterator)
           
 
Method Summary
 void clear()
           
 void close()
           
protected  java.io.InputStream inputStream()
           
protected  void open()
           
protected  java.io.OutputStream outputStream()
           
 
Methods inherited from class xxl.io.StreamQueue
closeInput, closeOutput, insert, next, openInput, openOutput, read, size, write
 
Methods inherited from class xxl.collections.AbstractQueue
hasNext, insertAll, peek, remove, replace, replaceAll, supportsPeek
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FACTORY_METHOD

public static final Function FACTORY_METHOD
A factory method to create a new RandomAccessFileQueue. It may be invoked with or without a given array. (see contract for FACTORY_METHOD in interface Queue) This factory method only overrides the method Object invoke(Object file, Object newObject).

file

protected java.io.File file

randomAccessFile

protected java.io.RandomAccessFile randomAccessFile

readOffset

protected long readOffset
Constructor Detail

RandomAccessFileQueue

public RandomAccessFileQueue(java.io.File file,
                             Converter converter,
                             Function newObject,
                             Function inputBufferSize,
                             Function outputBufferSize)

RandomAccessFileQueue

public RandomAccessFileQueue(java.io.File file,
                             Converter converter,
                             Function newObject,
                             Function inputBufferSize,
                             Function outputBufferSize,
                             java.util.Iterator iterator)

RandomAccessFileQueue

public RandomAccessFileQueue(java.io.File file,
                             Function newObject,
                             Function inputBufferSize,
                             Function outputBufferSize)

RandomAccessFileQueue

public RandomAccessFileQueue(java.io.File file,
                             Function newObject,
                             Function inputBufferSize,
                             Function outputBufferSize,
                             java.util.Iterator iterator)
Method Detail

open

protected void open()
             throws java.io.IOException

inputStream

protected java.io.InputStream inputStream()
                                   throws java.io.IOException
Overrides:
inputStream in class StreamQueue

outputStream

protected java.io.OutputStream outputStream()
                                     throws java.io.IOException
Overrides:
outputStream in class StreamQueue

clear

public void clear()
Overrides:
clear in class StreamQueue

close

public void close()
Overrides:
close in class StreamQueue