Liferay 6.0.5

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

java.lang.Object
  extended by java.io.OutputStream
      extended by com.liferay.portal.kernel.io.unsync.UnsyncByteArrayOutputStream
All Implemented Interfaces:
Closeable, Flushable

public class UnsyncByteArrayOutputStream
extends OutputStream

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


Field Summary
protected  byte[] buffer
           
protected  int index
           
 
Constructor Summary
UnsyncByteArrayOutputStream()
           
UnsyncByteArrayOutputStream(int size)
           
 
Method Summary
 void reset()
           
 int size()
           
 byte[] toByteArray()
           
 String toString()
           
 String toString(String charsetName)
           
 byte[] unsafeGetByteArray()
           
 void write(byte[] byteArray)
           
 void write(byte[] byteArray, int offset, int length)
           
 void write(int b)
           
 void writeTo(OutputStream outputStream)
           
 
Methods inherited from class java.io.OutputStream
close, flush
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

buffer

protected byte[] buffer

index

protected int index
Constructor Detail

UnsyncByteArrayOutputStream

public UnsyncByteArrayOutputStream()

UnsyncByteArrayOutputStream

public UnsyncByteArrayOutputStream(int size)
Method Detail

reset

public void reset()

size

public int size()

toByteArray

public byte[] toByteArray()

toString

public String toString()
Overrides:
toString in class Object

toString

public String toString(String charsetName)
                throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

unsafeGetByteArray

public byte[] unsafeGetByteArray()

write

public void write(byte[] byteArray)
Overrides:
write in class OutputStream

write

public void write(byte[] byteArray,
                  int offset,
                  int length)
Overrides:
write in class OutputStream

write

public void write(int b)
Specified by:
write in class OutputStream

writeTo

public void writeTo(OutputStream outputStream)
             throws IOException
Throws:
IOException

Liferay 6.0.5