TypedBytesRecordInput (Hadoop 1.2.1 API)
Date: 2013-07-22

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.hadoop.typedbytes
Class TypedBytesRecordInput

    java.lang.Object
      org.apache.hadoop.typedbytes.TypedBytesRecordInput

All Implemented Interfaces:
  RecordInput

    public class TypedBytesRecordInput

extends Object
implements RecordInput

Serializer for records that writes typed bytes.

Constructor Summary
`TypedBytesRecordInput(DataInput in)` Creates a new instance of TypedBytesRecordInput.
`TypedBytesRecordInput(TypedBytesInput in)` Creates a new instance of TypedBytesRecordInput.

Method Summary
`void` | `endMap(String tag)` Check the mark for end of the serialized map.
`void` | `endRecord(String tag)` Check the mark for end of the serialized record.
`void` | `endVector(String tag)` Check the mark for end of the serialized vector.
`static TypedBytesRecordInput` | `get(DataInput in)` Get a thread-local typed bytes record input for the supplied `DataInput`.
`static TypedBytesRecordInput` | `get(TypedBytesInput in)` Get a thread-local typed bytes record input for the supplied `TypedBytesInput`.
`boolean` | `readBool(String tag)` Read a boolean from serialized record.
`Buffer` | `readBuffer(String tag)` Read byte array from serialized record.
`byte` | `readByte(String tag)` Read a byte from serialized record.
`double` | `readDouble(String tag)` Read a double-precision number from serialized record.
`float` | `readFloat(String tag)` Read a single-precision float from serialized record.
`int` | `readInt(String tag)` Read an integer from serialized record.
`long` | `readLong(String tag)` Read a long integer from serialized record.
`String` | `readString(String tag)` Read a UTF-8 encoded string from serialized record.
`Index` | `startMap(String tag)` Check the mark for start of the serialized map.
`void` | `startRecord(String tag)` Check the mark for start of the serialized record.
`Index` | `startVector(String tag)` Check the mark for start of the serialized vector.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TypedBytesRecordInput

    public TypedBytesRecordInput(TypedBytesInput in)

  Creates a new instance of TypedBytesRecordInput.

### TypedBytesRecordInput

    public TypedBytesRecordInput(DataInput in)

  Creates a new instance of TypedBytesRecordInput.

Method Detail

### get

    public static TypedBytesRecordInput get(TypedBytesInput in)

  Get a thread-local typed bytes record input for the supplied `TypedBytesInput`.

  Parameters:
    `in` - typed bytes input object
  Returns:
    typed bytes record input corresponding to the supplied `TypedBytesInput`.

### get

    public static TypedBytesRecordInput get(DataInput in)

  Get a thread-local typed bytes record input for the supplied `DataInput`.

  Parameters:
    `in` - data input object
  Returns:
    typed bytes record input corresponding to the supplied `DataInput`.

### readBool

    public boolean readBool(String tag)
                     throws IOException

  Description copied from interface: `RecordInput`
  Read a boolean from serialized record.

  Specified by:
    `readBool` in interface `RecordInput`
  Parameters:
    `tag` - Used by tagged serialization formats (such as XML)
  Returns:
    value read from serialized record.
  Throws:
    `IOException`

### readBuffer

    public Buffer readBuffer(String tag)
                      throws IOException

  Description copied from interface: `RecordInput`
  Read byte array from serialized record.

  Specified by:
    `readBuffer` in interface `RecordInput`
  Parameters:
    `tag` - Used by tagged serialization formats (such as XML)
  Returns:
    value read from serialized record.
  Throws:
    `IOException`

### readByte

    public byte readByte(String tag)
                  throws IOException

  Description copied from interface: `RecordInput`
  Read a byte from serialized record.

  Specified by:
    `readByte` in interface `RecordInput`
  Parameters:
    `tag` - Used by tagged serialization formats (such as XML)
  Returns:
    value read from serialized record.
  Throws:
    `IOException`

### readDouble

    public double readDouble(String tag)
                      throws IOException

  Description copied from interface: `RecordInput`
  Read a double-precision number from serialized record.

  Specified by:
    `readDouble` in interface `RecordInput`
  Parameters:
    `tag` - Used by tagged serialization formats (such as XML)
  Returns:
    value read from serialized record.
  Throws:
    `IOException`

### readFloat

    public float readFloat(String tag)
                    throws IOException

  Description copied from interface: `RecordInput`
  Read a single-precision float from serialized record.

  Specified by:
    `readFloat` in interface `RecordInput`
  Parameters:
    `tag` - Used by tagged serialization formats (such as XML)
  Returns:
    value read from serialized record.
  Throws:
    `IOException`

### readInt

    public int readInt(String tag)
                throws IOException

  Description copied from interface: `RecordInput`
  Read an integer from serialized record.

  Specified by:
    `readInt` in interface `RecordInput`
  Parameters:
    `tag` - Used by tagged serialization formats (such as XML)
  Returns:
    value read from serialized record.
  Throws:
    `IOException`

### readLong

    public long readLong(String tag)
                  throws IOException

  Description copied from interface: `RecordInput`
  Read a long integer from serialized record.

  Specified by:
    `readLong` in interface `RecordInput`
  Parameters:
    `tag` - Used by tagged serialization formats (such as XML)
  Returns:
    value read from serialized record.
  Throws:
    `IOException`

### readString

    public String readString(String tag)
                      throws IOException

  Description copied from interface: `RecordInput`
  Read a UTF-8 encoded string from serialized record.

  Specified by:
    `readString` in interface `RecordInput`
  Parameters:
    `tag` - Used by tagged serialization formats (such as XML)
  Returns:
    value read from serialized record.
  Throws:
    `IOException`

### startRecord

    public void startRecord(String tag)
                     throws IOException

  Description copied from interface: `RecordInput`
  Check the mark for start of the serialized record.

  Specified by:
    `startRecord` in interface `RecordInput`
  Parameters:
    `tag` - Used by tagged serialization formats (such as XML)
  Throws:
    `IOException`

### startVector

    public Index startVector(String tag)
                      throws IOException

  Description copied from interface: `RecordInput`
  Check the mark for start of the serialized vector.

  Specified by:
    `startVector` in interface `RecordInput`
  Parameters:
    `tag` - Used by tagged serialization formats (such as XML)
  Returns:
    Index that is used to count the number of elements.
  Throws:
    `IOException`

### startMap

    public Index startMap(String tag)
                   throws IOException

  Description copied from interface: `RecordInput`
  Check the mark for start of the serialized map.

  Specified by:
    `startMap` in interface `RecordInput`
  Parameters:
    `tag` - Used by tagged serialization formats (such as XML)
  Returns:
    Index that is used to count the number of map entries.
  Throws:
    `IOException`

### endRecord

    public void endRecord(String tag)
                   throws IOException

  Description copied from interface: `RecordInput`
  Check the mark for end of the serialized record.

  Specified by:
    `endRecord` in interface `RecordInput`
  Parameters:
    `tag` - Used by tagged serialization formats (such as XML)
  Throws:
    `IOException`

### endVector

    public void endVector(String tag)
                   throws IOException

  Description copied from interface: `RecordInput`
  Check the mark for end of the serialized vector.

  Specified by:
    `endVector` in interface `RecordInput`
  Parameters:
    `tag` - Used by tagged serialization formats (such as XML)
  Throws:
    `IOException`

### endMap

    public void endMap(String tag)
                throws IOException

  Description copied from interface: `RecordInput`
  Check the mark for end of the serialized map.

  Specified by:
    `endMap` in interface `RecordInput`
  Parameters:
    `tag` - Used by tagged serialization formats (such as XML)
  Throws:
    `IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation