From 775130580ac34037ef2378d497fa02150976138f Mon Sep 17 00:00:00 2001 From: thenatog <38888042+thenatog@users.noreply.github.com> Date: Wed, 7 Jul 2021 18:36:58 -0400 Subject: [PATCH] NIFI-8616 - Updated DelimitedInputStream to extend the FilterInputStream class. (#5203) --- .../event/transport/netty/DelimitedInputStream.java | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/nifi-nar-bundles/nifi-extension-utils/nifi-event-transport/src/main/java/org/apache/nifi/event/transport/netty/DelimitedInputStream.java b/nifi-nar-bundles/nifi-extension-utils/nifi-event-transport/src/main/java/org/apache/nifi/event/transport/netty/DelimitedInputStream.java index 4f6a4b1d4c..bc1e81e192 100644 --- a/nifi-nar-bundles/nifi-extension-utils/nifi-event-transport/src/main/java/org/apache/nifi/event/transport/netty/DelimitedInputStream.java +++ b/nifi-nar-bundles/nifi-extension-utils/nifi-event-transport/src/main/java/org/apache/nifi/event/transport/netty/DelimitedInputStream.java @@ -16,28 +16,22 @@ */ package org.apache.nifi.event.transport.netty; -import java.io.IOException; +import java.io.FilterInputStream; import java.io.InputStream; /** * A delimited InputStream which retains a delimiter for later use */ -public class DelimitedInputStream extends InputStream { +public class DelimitedInputStream extends FilterInputStream { - private final InputStream in; private final byte[] delimiter; public DelimitedInputStream(final InputStream in, final byte[] delimiter) { - this.in = in; + super(in); this.delimiter = delimiter; } public byte[] getDelimiter() { return delimiter; } - - @Override - public int read() throws IOException { - return in.read(); - } }