-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Srikanth Govindarajan <[email protected]>
- Loading branch information
1 parent
c80bd2d
commit 4a7d5d4
Showing
7 changed files
with
192 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
...parser/src/main/java/org/opensearch/dataprepper/pipeline/parser/rule/RuleInputStream.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package org.opensearch.dataprepper.pipeline.parser.rule; | ||
|
||
import java.io.IOException; | ||
import java.io.InputStream; | ||
|
||
public class RuleInputStream { | ||
private String name; | ||
private InputStream inputStream; | ||
|
||
public RuleInputStream(String name, InputStream inputStream) { | ||
this.name = name; | ||
this.inputStream = inputStream; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public InputStream getInputStream() { | ||
return inputStream; | ||
} | ||
|
||
public void close() { | ||
if (inputStream != null) { | ||
try { | ||
inputStream.close(); | ||
} catch (IOException e) { | ||
throw new RuntimeException(e); | ||
} | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.