cascading.tuple.io
Class TupleOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by java.io.DataOutputStream
              extended by cascading.tuple.io.TupleOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.DataOutput, java.io.Flushable
Direct Known Subclasses:
HadoopTupleOutputStream

public abstract class TupleOutputStream
extends java.io.DataOutputStream

Class TupleOutputStream is used internally to write Tuples to storage.


Nested Class Summary
static interface TupleOutputStream.ElementWriter
           
protected static interface TupleOutputStream.TupleElementWriter
           
 
Field Summary
 
Fields inherited from class java.io.DataOutputStream
written
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
TupleOutputStream(java.util.Map<java.lang.Class,TupleOutputStream.TupleElementWriter> tupleElementWriters, java.io.OutputStream outputStream, TupleOutputStream.ElementWriter elementWriter)
           
 
Method Summary
 void close()
           
abstract  void writeIndexTuple(IndexTuple indexTuple)
           
protected abstract  void writeNull()
           
protected abstract  void writeNumElements(Tuple tuple)
           
 void writeTuple(Tuple tuple)
           
 void writeTuplePair(TuplePair tuplePair)
           
 
Methods inherited from class java.io.DataOutputStream
flush, size, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
 
Methods inherited from class java.io.FilterOutputStream
write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.io.DataOutput
write
 

Constructor Detail

TupleOutputStream

public TupleOutputStream(java.util.Map<java.lang.Class,TupleOutputStream.TupleElementWriter> tupleElementWriters,
                         java.io.OutputStream outputStream,
                         TupleOutputStream.ElementWriter elementWriter)
Method Detail

writeTuple

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

writeTuplePair

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

writeIndexTuple

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

writeNull

protected abstract void writeNull()
                           throws java.io.IOException
Throws:
java.io.IOException

writeNumElements

protected abstract void writeNumElements(Tuple tuple)
                                  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.FilterOutputStream
Throws:
java.io.IOException


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