T - a type of a streampublic class StreamsHolder<T extends Closeable> extends Object implements 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,
Path path)
Instantiates a new streams holder.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close both streams in this holder.
|
Path |
getPath()
Gets the path.
|
T |
getStream()
Gets the stream.
|
T |
getWrappedStream()
Gets the wrapped stream.
|
void |
setPath(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 IOException
IOException by closing wrapped stream is not thrown.close in interface Closeableclose in interface AutoCloseableIOExceptionInputStream.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 Path getPath()
public void setPath(Path path)
path - the new path