## cascading.tuple
Class TupleOutputStream

    java.lang.Object
      java.io.OutputStream
          java.io.FilterOutputStream
              java.io.DataOutputStream
                  cascading.tuple.TupleOutputStream

All Implemented Interfaces:
  Closeable, DataOutput, Flushable

    public class TupleOutputStream

extends DataOutputStream

Class TupleOutputStream is used internally to write Tuples to storage.

Nested Class Summary
`static interface` `TupleOutputStream.ElementWriter`

Field Summary
`static int` `WRITABLE_TOKEN` Field WRITABLE_TOKEN

Fields inherited from class java.io.DataOutputStream
`written`

Fields inherited from class java.io.FilterOutputStream
`out`

Constructor Summary
`TupleOutputStream(OutputStream outputStream)`
`TupleOutputStream(OutputStream outputStream, TupleOutputStream.ElementWriter elementWriter)`

Method Summary
`void` `close()`
`void` `writeIndexTuple(IndexTuple indexTuple)`
`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`

Field Detail

### WRITABLE_TOKEN

    public static final int WRITABLE_TOKEN

  Field WRITABLE_TOKEN

  See Also:
    Constant Field Values

Constructor Detail

### TupleOutputStream

    public TupleOutputStream(OutputStream outputStream,
                             TupleOutputStream.ElementWriter elementWriter)

### TupleOutputStream

    public TupleOutputStream(OutputStream outputStream)

Method Detail

### writeTuple

    public void writeTuple(Tuple tuple)
                    throws IOException

  Throws:
    `IOException`

### writeTuplePair

    public void writeTuplePair(TuplePair tuplePair)
                        throws IOException

  Throws:
    `IOException`

### writeIndexTuple

    public void writeIndexTuple(IndexTuple indexTuple)
                         throws IOException

  Throws:
    `IOException`

### close

    public void close()
               throws IOException

  Specified by:
    `close` in interface `Closeable`
  Overrides:
    `close` in class `FilterOutputStream`
  Throws:
    `IOException`

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