cascading.tuple.io

## Class TupleOutputStream

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

All Implemented Interfaces:
  java.io.Closeable, java.io.DataOutput, java.io.Flushable, java.lang.AutoCloseable

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

Nested Classes
`static interface` `TupleOutputStream.ElementWriter`
`static interface` `TupleOutputStream.TupleElementWriter`

### Field Summary

### Fields inherited from class java.io.DataOutputStream

`written`

### Fields inherited from class java.io.FilterOutputStream

`out`

### Constructor Summary

Constructors
Constructor and Description
`TupleOutputStream(java.util.Map<java.lang.Class,TupleOutputStream.TupleElementWriter> tupleUnTypedElementWriters, java.util.Map<java.lang.Class,TupleOutputStream.TupleElementWriter> tupleTypedElementWriters, java.io.OutputStream outputStream, TupleOutputStream.ElementWriter elementWriter)`

### Method Summary

Methods
`void` `close()`
`TupleOutputStream.TupleElementWriter` `getWriterFor(java.lang.Class type)`
`void` `writeElement(java.lang.Object element)`
`void` `writeElementArray(java.lang.Object[] elements)`
`abstract void` `writeIndexTuple(IndexTuple indexTuple)`
`protected abstract void` `writeIntInternal(int value)`
`void` `writeTuple(Tuple tuple)`
`void` `writeTuplePair(TuplePair tuplePair)`
`void` `writeTyped(java.lang.Class[] classes, Tuple tuple)`
`void` `writeTypedElement(java.lang.Class type, java.lang.Object element)`
`void` `writeUnTyped(Tuple tuple)`
`void` `writeWith(TupleOutputStream.TupleElementWriter[] writers, Tuple tuple)`

### 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> tupleUnTypedElementWriters,
                     java.util.Map<java.lang.Class,TupleOutputStream.TupleElementWriter> tupleTypedElementWriters,
                     java.io.OutputStream outputStream,
                     TupleOutputStream.ElementWriter elementWriter)

### Method Detail

#### getWriterFor

    public final TupleOutputStream.TupleElementWriter getWriterFor(java.lang.Class type)
                                                            throws java.io.IOException

Throws:
  `java.io.IOException`

#### 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`

#### writeWith

    public void writeWith(TupleOutputStream.TupleElementWriter[] writers,
                 Tuple tuple)
                   throws java.io.IOException

Throws:
  `java.io.IOException`

#### writeTyped

    public void writeTyped(java.lang.Class[] classes,
                  Tuple tuple)
                    throws java.io.IOException

Throws:
  `java.io.IOException`

#### writeUnTyped

    public void writeUnTyped(Tuple tuple)
                      throws java.io.IOException

Throws:
  `java.io.IOException`

#### writeElementArray

    public void writeElementArray(java.lang.Object[] elements)
                           throws java.io.IOException

Throws:
  `java.io.IOException`

#### writeTypedElement

    public final void writeTypedElement(java.lang.Class type,
                         java.lang.Object element)
                                 throws java.io.IOException

Throws:
  `java.io.IOException`

#### writeElement

    public final void writeElement(java.lang.Object element)
                            throws java.io.IOException

Throws:
  `java.io.IOException`

#### writeIntInternal

    protected abstract void writeIntInternal(int value)
                                      throws java.io.IOException

Throws:
  `java.io.IOException`

#### close

    public void close()
               throws java.io.IOException

Specified by:
  `close` in interface `java.io.Closeable`
Specified by:
  `close` in interface `java.lang.AutoCloseable`
Overrides:
  `close` in class `java.io.FilterOutputStream`
Throws:
  `java.io.IOException`