Package org.aksw.commons.io.process.pipe
Class InputStreamOrPath
- java.lang.Object
-
- org.aksw.commons.io.process.pipe.InputStreamOrPath
-
public class InputStreamOrPath extends Object
Object that holds either an input stream or a path. Used to set up process redirection.- Author:
- raven
-
-
Field Summary
Fields Modifier and Type Field Description protected InputStreaminputStreamprotected Pathpath
-
Constructor Summary
Constructors Constructor Description InputStreamOrPath(InputStream inputStream)InputStreamOrPath(Path path)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static InputStreamOrPathfrom(InputStream inputStream)static InputStreamOrPathfrom(Path path)InputStreamgetInputStream()PathgetPath()booleanisPath()booleanisStream()
-
-
-
Field Detail
-
path
protected Path path
-
inputStream
protected InputStream inputStream
-
-
Constructor Detail
-
InputStreamOrPath
public InputStreamOrPath(Path path)
-
InputStreamOrPath
public InputStreamOrPath(InputStream inputStream)
-
-
Method Detail
-
from
public static InputStreamOrPath from(Path path)
-
from
public static InputStreamOrPath from(InputStream inputStream)
-
isPath
public boolean isPath()
-
getPath
public Path getPath()
-
isStream
public boolean isStream()
-
getInputStream
public InputStream getInputStream()
-
-