public final class OutputStreamBuilder extends OutputStream
| Modifier and Type | Method and Description |
|---|---|
Object |
build()
Builds the result of using this builder as either a
CachedOutputStream
if stream caching is enabled, otherwise byte[]. |
void |
close() |
void |
flush() |
static OutputStreamBuilder |
withExchange(org.apache.camel.Exchange exchange)
Creates a new OutputStreamBuilder with the current exchange
Use the
build() when writing to the stream is finished, and you need the result of this operation. |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
public static OutputStreamBuilder withExchange(org.apache.camel.Exchange exchange)
build() when writing to the stream is finished, and you need the result of this operation.exchange - the current Exchangepublic void write(byte[] b,
int off,
int len)
throws IOException
write in class OutputStreamIOExceptionpublic void write(byte[] b)
throws IOException
write in class OutputStreamIOExceptionpublic void write(int b)
throws IOException
write in class OutputStreamIOExceptionpublic void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOExceptionpublic Object build() throws IOException
CachedOutputStream
if stream caching is enabled, otherwise byte[].IOExceptionApache Camel