public class FlowFileAccessOutputStream extends FilterOutputStream
Wraps an OutputStream so that if any IOException is thrown, it will be wrapped in a FlowFileAccessException. We do this to isolate IOExceptions thrown by the framework from those thrown by user code. If thrown by the framework, it generally indicates a problem communicating with the Content Repository (such as out of disk space) and session rollback is often appropriate so that the FlowFile can be processed again.
| Modifier and Type | Field and Description |
|---|---|
private FlowFile |
flowFile |
private OutputStream |
out |
| Constructor and Description |
|---|
FlowFileAccessOutputStream(OutputStream out,
FlowFile flowFile) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush() |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
private final FlowFile flowFile
private final OutputStream out
public FlowFileAccessOutputStream(OutputStream out, FlowFile flowFile)
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class FilterOutputStreamIOExceptionpublic void write(byte[] b,
int off,
int len)
throws IOException
write in class FilterOutputStreamIOExceptionpublic void write(int b)
throws IOException
write in class FilterOutputStreamIOExceptionpublic void write(byte[] b)
throws IOException
write in class FilterOutputStreamIOExceptionpublic void flush()
throws IOException
flush in interface Flushableflush in class FilterOutputStreamIOExceptionCopyright © 2021 Apache NiFi Project. All rights reserved.