class MultiPartOutputStream extends OutputStream
An OutputStream which packages data written to it into discrete StreamParts which can be obtained
in a separate thread via iteration and uploaded to S3.
A single MultiPartOutputStream is allocated a range of part numbers it can assign to the StreamParts
it produces, which is determined at construction.
Creating a StreamPart is triggered when MultiPartOutputStream#checkSize() is called and the stream
holds enough data, so be sure to call this regularly when writing data. It's also essential to call
MultiPartOutputStream#close() when finished so that it can create the final StreamPart and consumers
can finish.
- Alphabetic
- By Inheritance
- MultiPartOutputStream
- OutputStream
- Flushable
- Closeable
- AutoCloseable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new MultiPartOutputStream(partNumberStart: Int, partNumberEnd: Int, partSize: Int, queue: BlockingQueue[StreamPart])
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
checkSize(): Unit
Checks if the stream currently contains enough data to create a new part.
Checks if the stream currently contains enough data to create a new part.
Internally this puts the part on a queue, which if full will cause this method to block and potentially throw an
InterruptedException, in which case retrying is acceptable. -
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
close(): Unit
Packages any remaining data into a
StreamPartand signals to theStreamTransferManagerthat there are no more parts afterwards.Packages any remaining data into a
StreamPartand signals to theStreamTransferManagerthat there are no more parts afterwards. You cannot write to the stream after it has been closed.- Definition Classes
- MultiPartOutputStream → OutputStream → Closeable → AutoCloseable
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
flush(): Unit
- Definition Classes
- OutputStream → Flushable
- Annotations
- @throws( classOf[java.io.IOException] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- MultiPartOutputStream → AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
write(b: Array[Byte]): Unit
- Definition Classes
- MultiPartOutputStream → OutputStream
-
def
write(b: Array[Byte], off: Int, len: Int): Unit
- Definition Classes
- MultiPartOutputStream → OutputStream
-
def
write(b: Int): Unit
- Definition Classes
- MultiPartOutputStream → OutputStream