com.liferay.portal.kernel.io.unsync
Class UnsyncByteArrayInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by com.liferay.portal.kernel.io.unsync.UnsyncByteArrayInputStream
All Implemented Interfaces:
java.io.Closeable

public class UnsyncByteArrayInputStream
extends java.io.InputStream

View Source

See http://issues.liferay.com/browse/LPS-6648.

Author:
Shuyang Zhou

Field Summary
protected  byte[] buffer
           
protected  int capacity
           
protected  int index
           
protected  int markIndex
           
 
Constructor Summary
UnsyncByteArrayInputStream(byte[] buffer)
           
UnsyncByteArrayInputStream(byte[] buffer, int offset, int length)
           
 
Method Summary
 int available()
           
 void mark(int readAheadLimit)
           
 boolean markSupported()
           
 int read()
           
 int read(byte[] byteArray)
           
 int read(byte[] byteArray, int offset, int length)
           
 void reset()
           
 long skip(long skip)
           
 
Methods inherited from class java.io.InputStream
close
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

buffer

protected byte[] buffer

capacity

protected int capacity

index

protected int index

markIndex

protected int markIndex
Constructor Detail

UnsyncByteArrayInputStream

public UnsyncByteArrayInputStream(byte[] buffer)

UnsyncByteArrayInputStream

public UnsyncByteArrayInputStream(byte[] buffer,
                                  int offset,
                                  int length)
Method Detail

available

public int available()
Overrides:
available in class java.io.InputStream

mark

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

markSupported

public boolean markSupported()
Overrides:
markSupported in class java.io.InputStream

read

public int read()
Specified by:
read in class java.io.InputStream

read

public int read(byte[] byteArray)
Overrides:
read in class java.io.InputStream

read

public int read(byte[] byteArray,
                int offset,
                int length)
Overrides:
read in class java.io.InputStream

reset

public void reset()
Overrides:
reset in class java.io.InputStream

skip

public long skip(long skip)
Overrides:
skip in class java.io.InputStream