xxl.io
Class StreamQueue

java.lang.Object
  |
  +--xxl.collections.AbstractQueue
        |
        +--xxl.io.StreamQueue
Direct Known Subclasses:
RandomAccessFileQueue

public abstract class StreamQueue
extends AbstractQueue


Field Summary
protected  Converter converter
           
protected  java.io.DataInputStream dataInputStream
           
protected  java.io.DataOutputStream dataOutputStream
           
static Function FACTORY_METHOD
           
protected  Function inputBufferSize
           
protected  Function newObject
           
protected  Function outputBufferSize
           
protected  int size
           
 
Fields inherited from class xxl.collections.AbstractQueue
FACTORY_METHOD
 
Constructor Summary
StreamQueue(Converter converter, Function newObject, Function inputBufferSize, Function outputBufferSize)
          Creates a new StreamQueue.
StreamQueue(Function newObject, Function inputBufferSize, Function outputBufferSize)
           
 
Method Summary
 void clear()
           
 void close()
           
protected  void closeInput()
           
protected  void closeOutput()
           
protected abstract  java.io.InputStream inputStream()
           
 void insert(java.lang.Object object)
           
 java.lang.Object next()
           
protected  void openInput()
           
protected  void openOutput()
           
protected abstract  java.io.OutputStream outputStream()
           
protected  java.lang.Object read()
           
 int size()
           
protected  void write(java.lang.Object object)
           
 
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

converter

protected Converter converter

newObject

protected Function newObject

size

protected int size

dataInputStream

protected java.io.DataInputStream dataInputStream

dataOutputStream

protected java.io.DataOutputStream dataOutputStream

inputBufferSize

protected Function inputBufferSize

outputBufferSize

protected Function outputBufferSize
Constructor Detail

StreamQueue

public StreamQueue(Converter converter,
                   Function newObject,
                   Function inputBufferSize,
                   Function outputBufferSize)
Creates a new StreamQueue.
Parameters:
inputBufferSize - returns an Integer-Object
outputBufferSize - returns an Integer-Object

StreamQueue

public StreamQueue(Function newObject,
                   Function inputBufferSize,
                   Function outputBufferSize)
Method Detail

inputStream

protected abstract java.io.InputStream inputStream()
                                            throws java.io.IOException

outputStream

protected abstract java.io.OutputStream outputStream()
                                              throws java.io.IOException

read

protected java.lang.Object read()
                         throws java.io.IOException

write

protected void write(java.lang.Object object)
              throws java.io.IOException

size

public int size()
Overrides:
size in class AbstractQueue

insert

public void insert(java.lang.Object object)
Overrides:
insert in class AbstractQueue

next

public java.lang.Object next()
                      throws java.util.NoSuchElementException
Overrides:
next in class AbstractQueue

clear

public void clear()
Overrides:
clear in class AbstractQueue

openInput

protected void openInput()

closeInput

protected void closeInput()

openOutput

protected void openOutput()

closeOutput

protected void closeOutput()

close

public void close()
Overrides:
close in class AbstractQueue