com.alibaba.dubbo.common.io
Class UnsafeByteArrayInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by com.alibaba.dubbo.common.io.UnsafeByteArrayInputStream
All Implemented Interfaces:
Closeable

public class UnsafeByteArrayInputStream
extends InputStream

UnsafeByteArrayInputStrem.

Author:
qian.lei

Constructor Summary
UnsafeByteArrayInputStream(byte[] buf)
           
UnsafeByteArrayInputStream(byte[] buf, int offset)
           
UnsafeByteArrayInputStream(byte[] buf, int offset, int length)
           
 
Method Summary
 int available()
           
 void close()
           
 void mark(int readAheadLimit)
           
 boolean markSupported()
           
 int position()
           
 void position(int newPosition)
           
 int read()
           
 int read(byte[] b, int off, int len)
           
 void reset()
           
 int size()
           
 long skip(long len)
           
 
Methods inherited from class java.io.InputStream
read
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnsafeByteArrayInputStream

public UnsafeByteArrayInputStream(byte[] buf)

UnsafeByteArrayInputStream

public UnsafeByteArrayInputStream(byte[] buf,
                                  int offset)

UnsafeByteArrayInputStream

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

read

public int read()
Specified by:
read in class InputStream

read

public int read(byte[] b,
                int off,
                int len)
Overrides:
read in class InputStream

skip

public long skip(long len)
Overrides:
skip in class InputStream

available

public int available()
Overrides:
available in class InputStream

markSupported

public boolean markSupported()
Overrides:
markSupported in class InputStream

mark

public void mark(int readAheadLimit)
Overrides:
mark in class InputStream

reset

public void reset()
Overrides:
reset in class InputStream

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class InputStream
Throws:
IOException

position

public int position()

position

public void position(int newPosition)

size

public int size()


Copyright © 2012–2017 Alibaba. All rights reserved.