cascading.tuple.io

## Class TupleInputStream

- java.lang.Object
- - java.io.InputStream
  - - java.io.FilterInputStream
    - - java.io.DataInputStream
      - - cascading.tuple.io.TupleInputStream

- All Implemented Interfaces:
    Closeable, DataInput, AutoCloseable

      public abstract class TupleInputStream
      extends DataInputStream

  Class TupleInputStream is used internally to read Tuples from storage.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `TupleInputStream.ElementReader`
    `static interface` | `TupleInputStream.TupleElementReader<T extends TupleInputStream>`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected TupleInputStream.ElementReader` | `elementReader` Field elementReader
    `protected InputStream` | `inputStream` Field inputStream

    - ### Fields inherited from class java.io.FilterInputStream

      `in`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TupleInputStream(InputStream inputStream, TupleInputStream.ElementReader elementReader)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `Comparator` | `getComparatorFor(int type)`
    `InputStream` | `getInputStream()`
    `abstract Object` | `getNextElement()`
    `abstract int` | `getNumElements()`
    `IndexTuple` | `readIndexTuple()`
    `abstract IndexTuple` | `readIndexTuple(IndexTuple tuple)`
    `abstract int` | `readToken()`
    `Tuple` | `readTuple()`
    `<T extends Tuple> T` | `readTuple(T tuple)`
    `TuplePair` | `readTuplePair()`
    `TuplePair` | `readTuplePair(TuplePair tuplePair)`
    `abstract Object` | `readType(Class type)`
    `protected abstract Object` | `readType(int type)`
    `<T extends Tuple> T` | `readTyped(Class[] classes, T tuple)`
    `<T extends Tuple> T` | `readUnTyped(T tuple)`
    `<T extends Tuple> T` | `readWith(TupleInputStream.TupleElementReader[] readers, T tuple)`

    - ### 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 InputStream inputStream

      Field inputStream

    - #### elementReader

          protected final TupleInputStream.ElementReader elementReader

      Field elementReader

  - ### Constructor Detail

    - #### TupleInputStream

          public TupleInputStream(InputStream inputStream,
                          TupleInputStream.ElementReader elementReader)

  - ### Method Detail

    - #### getInputStream

          public InputStream getInputStream()

    - #### readTuple

          public Tuple readTuple()
                          throws IOException

      Throws:
        `IOException`

    - #### readWith

          public <T extends Tuple> T readWith(TupleInputStream.TupleElementReader[] readers,
                                     T tuple)
                                   throws IOException

      Throws:
        `IOException`

    - #### readTuple

          public <T extends Tuple> T readTuple(T tuple)
                                    throws IOException

      Throws:
        `IOException`

    - #### readTyped

          public <T extends Tuple> T readTyped(Class[] classes,
                                      T tuple)
                                    throws IOException

      Throws:
        `IOException`

    - #### readUnTyped

          public <T extends Tuple> T readUnTyped(T tuple)
                                      throws IOException

      Throws:
        `IOException`

    - #### getNumElements

          public abstract int getNumElements()
                                      throws IOException

      Throws:
        `IOException`

    - #### readToken

          public abstract int readToken()
                                 throws IOException

      Throws:
        `IOException`

    - #### getNextElement

          public abstract Object getNextElement()
                                         throws IOException

      Throws:
        `IOException`

    - #### readTuplePair

          public TuplePair readTuplePair()
                                  throws IOException

      Throws:
        `IOException`

    - #### readTuplePair

          public TuplePair readTuplePair(TuplePair tuplePair)
                                  throws IOException

      Throws:
        `IOException`

    - #### readIndexTuple

          public IndexTuple readIndexTuple()
                                    throws IOException

      Throws:
        `IOException`

    - #### readIndexTuple

          public abstract IndexTuple readIndexTuple(IndexTuple tuple)
                                             throws IOException

      Throws:
        `IOException`

    - #### readType

          protected abstract Object readType(int type)
                                      throws IOException

      Throws:
        `IOException`

    - #### readType

          public abstract Object readType(Class type)
                                   throws IOException

      Throws:
        `IOException`

    - #### getComparatorFor

          public Comparator getComparatorFor(int type)
                                      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 `FilterInputStream`
      Throws:
        `IOException`

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