org.apache.hadoop.hive.common.io
Class NonSyncByteArrayInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.ByteArrayInputStream
          extended by org.apache.hadoop.hive.common.io.NonSyncByteArrayInputStream
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
ByteStream.Input

public class NonSyncByteArrayInputStream
extends ByteArrayInputStream

A thread-not-safe version of ByteArrayInputStream, which removes all synchronized modifiers.


Field Summary
 
Fields inherited from class java.io.ByteArrayInputStream
buf, count, mark, pos
 
Constructor Summary
NonSyncByteArrayInputStream()
           
NonSyncByteArrayInputStream(byte[] bs)
           
NonSyncByteArrayInputStream(byte[] buf, int offset, int length)
           
 
Method Summary
 int available()
          
 int getLength()
           
 int getPosition()
           
 int read()
          
 int read(byte[] b, int off, int len)
          
 void reset(byte[] input, int start, int length)
           
 long skip(long n)
          
 
Methods inherited from class java.io.ByteArrayInputStream
close, mark, markSupported, reset
 
Methods inherited from class java.io.InputStream
read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NonSyncByteArrayInputStream

public NonSyncByteArrayInputStream()

NonSyncByteArrayInputStream

public NonSyncByteArrayInputStream(byte[] bs)

NonSyncByteArrayInputStream

public NonSyncByteArrayInputStream(byte[] buf,
                                   int offset,
                                   int length)
Method Detail

reset

public void reset(byte[] input,
                  int start,
                  int length)

getPosition

public int getPosition()

getLength

public int getLength()

read

public int read()

Overrides:
read in class ByteArrayInputStream

read

public int read(byte[] b,
                int off,
                int len)

Overrides:
read in class ByteArrayInputStream

skip

public long skip(long n)

Overrides:
skip in class ByteArrayInputStream

available

public int available()

Overrides:
available in class ByteArrayInputStream


Copyright © 2013 The Apache Software Foundation