cascading.tuple.io

## Class TupleOutputStream

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

- All Implemented Interfaces:
    Closeable, DataOutput, Flushable, AutoCloseable

      public abstract class TupleOutputStream
      extends DataOutputStream

  Class TupleOutputStream is used internally to write Tuples to storage.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `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(Map<Class,TupleOutputStream.TupleElementWriter> tupleUnTypedElementWriters, Map<Class,TupleOutputStream.TupleElementWriter> tupleTypedElementWriters, OutputStream outputStream, TupleOutputStream.ElementWriter elementWriter)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `TupleOutputStream.TupleElementWriter` | `getWriterFor(Class type)`
    `void` | `writeElement(Object element)`
    `void` | `writeElementArray(Object[] elements)`
    `abstract void` | `writeIndexTuple(IndexTuple indexTuple)`
    `protected abstract void` | `writeIntInternal(int value)`
    `void` | `writeTuple(Tuple tuple)`
    `void` | `writeTuplePair(TuplePair tuplePair)`
    `void` | `writeTyped(Class[] classes, Tuple tuple)`
    `void` | `writeTypedElement(Class type, 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(Map<Class,TupleOutputStream.TupleElementWriter> tupleUnTypedElementWriters,
                           Map<Class,TupleOutputStream.TupleElementWriter> tupleTypedElementWriters,
                           OutputStream outputStream,
                           TupleOutputStream.ElementWriter elementWriter)

  - ### Method Detail

    - #### getWriterFor

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

      Throws:
        `IOException`

    - #### writeTuple

          public void writeTuple(Tuple tuple)
                          throws IOException

      Throws:
        `IOException`

    - #### writeTuplePair

          public void writeTuplePair(TuplePair tuplePair)
                              throws IOException

      Throws:
        `IOException`

    - #### writeIndexTuple

          public abstract void writeIndexTuple(IndexTuple indexTuple)
                                        throws IOException

      Throws:
        `IOException`

    - #### writeWith

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

      Throws:
        `IOException`

    - #### writeTyped

          public void writeTyped(Class[] classes,
                        Tuple tuple)
                          throws IOException

      Throws:
        `IOException`

    - #### writeUnTyped

          public void writeUnTyped(Tuple tuple)
                            throws IOException

      Throws:
        `IOException`

    - #### writeElementArray

          public void writeElementArray(Object[] elements)
                                 throws IOException

      Throws:
        `IOException`

    - #### writeTypedElement

          public final void writeTypedElement(Class type,
                               Object element)
                                       throws IOException

      Throws:
        `IOException`

    - #### writeElement

          public final void writeElement(Object element)
                                  throws IOException

      Throws:
        `IOException`

    - #### writeIntInternal

          protected abstract void writeIntInternal(int value)
                                            throws IOException

      Throws:
        `IOException`

    - #### close

          public void close()
                     throws IOException

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

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