cascading.tuple.io
Class TupleInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by java.io.DataInputStream
              extended by cascading.tuple.io.TupleInputStream
All Implemented Interfaces:
java.io.Closeable, java.io.DataInput
Direct Known Subclasses:
HadoopTupleInputStream

public abstract class TupleInputStream
extends java.io.DataInputStream

Class TupleInputStream is used internally to read Tuples from storage.


Nested Class Summary
static interface TupleInputStream.ElementReader
           
 
Field Summary
protected  TupleInputStream.ElementReader elementReader
          Field elementReader
protected  java.io.InputStream inputStream
          Field inputStream
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
TupleInputStream(java.io.InputStream inputStream, TupleInputStream.ElementReader elementReader)
           
 
Method Summary
 void close()
           
 java.util.Comparator getComparatorFor(int type)
           
 java.io.InputStream getInputStream()
           
abstract  java.lang.Object getNextElement()
           
abstract  int getNumElements()
           
 IndexTuple readIndexTuple()
           
abstract  IndexTuple readIndexTuple(IndexTuple indexTuple)
           
abstract  int readToken()
           
 Tuple readTuple()
           
 Tuple readTuple(Tuple tuple)
           
 TuplePair readTuplePair()
           
 TuplePair readTuplePair(TuplePair tuplePair)
           
protected abstract  java.lang.Object readType(int type)
           
 
Methods inherited from class java.io.DataInputStream
read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, readUTF, skipBytes
 
Methods inherited from class java.io.FilterInputStream
available, mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

inputStream

protected final java.io.InputStream inputStream
Field inputStream


elementReader

protected final TupleInputStream.ElementReader elementReader
Field elementReader

Constructor Detail

TupleInputStream

public TupleInputStream(java.io.InputStream inputStream,
                        TupleInputStream.ElementReader elementReader)
Method Detail

getInputStream

public java.io.InputStream getInputStream()

readTuple

public Tuple readTuple()
                throws java.io.IOException
Throws:
java.io.IOException

readTuple

public Tuple readTuple(Tuple tuple)
                throws java.io.IOException
Throws:
java.io.IOException

getNumElements

public abstract int getNumElements()
                            throws java.io.IOException
Throws:
java.io.IOException

readToken

public abstract int readToken()
                       throws java.io.IOException
Throws:
java.io.IOException

getNextElement

public abstract java.lang.Object getNextElement()
                                         throws java.io.IOException
Throws:
java.io.IOException

readTuplePair

public TuplePair readTuplePair()
                        throws java.io.IOException
Throws:
java.io.IOException

readTuplePair

public TuplePair readTuplePair(TuplePair tuplePair)
                        throws java.io.IOException
Throws:
java.io.IOException

readIndexTuple

public IndexTuple readIndexTuple()
                          throws java.io.IOException
Throws:
java.io.IOException

readIndexTuple

public abstract IndexTuple readIndexTuple(IndexTuple indexTuple)
                                   throws java.io.IOException
Throws:
java.io.IOException

readType

protected abstract java.lang.Object readType(int type)
                                      throws java.io.IOException
Throws:
java.io.IOException

getComparatorFor

public java.util.Comparator getComparatorFor(int type)
                                      throws java.io.IOException
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.FilterInputStream
Throws:
java.io.IOException


Copyright © 2007-2011 Concurrent, Inc. All Rights Reserved.