org.apache.hadoop.hbase.io
Class DataInputInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by org.apache.hadoop.hbase.io.DataInputInputStream
All Implemented Interfaces:
Closeable

@InterfaceAudience.Private
public class DataInputInputStream
extends InputStream

An InputStream that wraps a DataInput.

See Also:
DataOutputOutputStream

Constructor Summary
DataInputInputStream(DataInput in)
           
 
Method Summary
static InputStream constructInputStream(DataInput in)
          Construct an InputStream from the given DataInput.
 int read()
           
 
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataInputInputStream

public DataInputInputStream(DataInput in)
Method Detail

constructInputStream

public static InputStream constructInputStream(DataInput in)
Construct an InputStream from the given DataInput. If 'in' is already an InputStream, simply returns it. Otherwise, wraps it in an InputStream.

Parameters:
in - the DataInput to wrap
Returns:
an InputStream instance that reads from 'in'

read

public int read()
         throws IOException
Specified by:
read in class InputStream
Throws:
IOException


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.