public class BundledStream extends Object implements Stream
A BundledStream
is an abstraction that contains an InputStream
and a
StreamDescriptor
. The descriptors are being used by the Node
s to decide if they
can / will handle this stream or not.
Example:
We have a StreamBundle
containing two Stream
s, one representing a TIFF file and
one representing a GIF file. If we want to do a kind of "GIF2TIFF" conversion in a
certain Node
, this worker will only convert the second stream (the GIF file).
Constructor and Description |
---|
BundledStream(InputStream stream,
StreamDescriptor type)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the encapsulated input stream.
|
StreamDescriptor |
getDescriptor()
Get the associated
StreamDescriptor . |
com.levigo.jadice.document.io.SeekableInputStream |
getInputStream()
Get the associated
SeekableInputStream . |
public BundledStream(InputStream stream, StreamDescriptor type)
stream
- the InputStream
. Must not be null
.type
- the associated StreamDescriptor
. Must not be null
.public com.levigo.jadice.document.io.SeekableInputStream getInputStream() throws IOException
Stream
SeekableInputStream
.getInputStream
in interface Stream
IOException
public StreamDescriptor getDescriptor()
Stream
StreamDescriptor
.getDescriptor
in interface Stream
StreamDescriptor
public void close() throws IOException
Stream
close
in interface Stream
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2017 levigo holding gmbh. All rights reserved.