com.sun.mail.util
Class SharedByteArrayOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.ByteArrayOutputStream
          extended by com.sun.mail.util.SharedByteArrayOutputStream
All Implemented Interfaces:
Closeable, Flushable

public class SharedByteArrayOutputStream
extends ByteArrayOutputStream

A ByteArrayOutputStream that allows us to share the byte array rather than copy it. Eventually could replace this with something that doesn't require a single contiguous byte array.

Since:
JavaMail 1.4.5
Author:
Bill Shannon

Field Summary
 
Fields inherited from class java.io.ByteArrayOutputStream
buf, count
 
Constructor Summary
SharedByteArrayOutputStream(int size)
           
 
Method Summary
 InputStream toStream()
           
 
Methods inherited from class java.io.ByteArrayOutputStream
close, reset, size, toByteArray, toString, toString, toString, write, write, writeTo
 
Methods inherited from class java.io.OutputStream
flush, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SharedByteArrayOutputStream

public SharedByteArrayOutputStream(int size)
Method Detail

toStream

public InputStream toStream()


Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.