TypedBytesWritable (Hadoop 0.20.1+169.127 API)
Date: 2011-01-16

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 TypedBytesWritable

    java.lang.Object
      org.apache.hadoop.io.BinaryComparable
          org.apache.hadoop.io.BytesWritable
              org.apache.hadoop.typedbytes.TypedBytesWritable

All Implemented Interfaces:
  Comparable<BinaryComparable>, Writable, WritableComparable<BinaryComparable>

    public class TypedBytesWritable

extends BytesWritable

Writable for typed bytes.

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.hadoop.io.BytesWritable
`BytesWritable.Comparator`

Constructor Summary
`TypedBytesWritable()` Create a TypedBytesWritable.
`TypedBytesWritable(byte[] bytes)` Create a TypedBytesWritable with a given byte array as initial value.

Method Summary
`Type` | `getType()` Get the type code embedded in the first byte.
`Object` | `getValue()` Get the typed bytes as a Java object.
`void` | `setValue(Object obj)` Set the typed bytes from a given Java object.
`String` | `toString()` Generate a suitable string representation.

Methods inherited from class org.apache.hadoop.io.BytesWritable
`equals, get, getBytes, getCapacity, getLength, getSize, hashCode, readFields, set, set, setCapacity, setSize, write`

Methods inherited from class org.apache.hadoop.io.BinaryComparable
`compareTo, compareTo`

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

Methods inherited from interface java.lang.Comparable
`compareTo`

Constructor Detail

### TypedBytesWritable

    public TypedBytesWritable()

  Create a TypedBytesWritable.

### TypedBytesWritable

    public TypedBytesWritable(byte[] bytes)

  Create a TypedBytesWritable with a given byte array as initial value.

Method Detail

### setValue

    public void setValue(Object obj)

  Set the typed bytes from a given Java object.

### getValue

    public Object getValue()

  Get the typed bytes as a Java object.

### getType

    public Type getType()

  Get the type code embedded in the first byte.

### toString

    public String toString()

  Generate a suitable string representation.

  Overrides:
    `toString` in class `BytesWritable`

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