T - a type of a streampublic class StreamsHolder<T extends java.io.Closeable>
extends java.lang.Object
implements java.io.Closeable
| Constructor and Description | 
|---|
| StreamsHolder()Instantiates a new streams holder. | 
| StreamsHolder(T stream,
             T wrappedStream)Instantiates a new streams holder. | 
| StreamsHolder(T stream,
             T wrappedStream,
             org.apache.hadoop.fs.Path path)Instantiates a new streams holder. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | close()Close both streams in this holder. | 
| org.apache.hadoop.fs.Path | getPath()Gets the path. | 
| T | getStream()Gets the stream. | 
| T | getWrappedStream()Gets the wrapped stream. | 
| void | setPath(org.apache.hadoop.fs.Path path)Sets the path. | 
| void | setStream(T stream)Sets the stream. | 
| void | setWrappedStream(T wrappedStream)Sets the wrapped stream. | 
public StreamsHolder()
public StreamsHolder(T stream, T wrappedStream)
stream - the streamwrappedStream - the wrapped streampublic void close()
           throws java.io.IOException
IOException by closing wrapped stream is not thrown.close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOExceptionInputStream.close(), 
OutputStream.close()public T getStream()
public void setStream(T stream)
stream - the new streampublic T getWrappedStream()
public void setWrappedStream(T wrappedStream)
wrappedStream - the new wrapped streampublic org.apache.hadoop.fs.Path getPath()
public void setPath(org.apache.hadoop.fs.Path path)
path - the new path