|
Spring for Apache Hadoop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.data.hadoop.store.support.StreamsHolder<T>
T
- a type of a streampublic class StreamsHolder<T extends java.io.Closeable>
Holder object for streams. Mostly concept of a wrapped streams are used with a compressed streams in a hadoop where some information still needs to be accessed from an underlying stream.
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StreamsHolder()
public StreamsHolder(T stream, T wrappedStream)
stream
- the streamwrappedStream
- the wrapped streampublic StreamsHolder(T stream, T wrappedStream, org.apache.hadoop.fs.Path path)
stream
- the streamwrappedStream
- the wrapped streampath
- the pathMethod Detail |
---|
public void close() throws java.io.IOException
IOException
by closing wrapped stream is not thrown.
close
in interface java.io.Closeable
java.io.IOException
InputStream.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
|
Spring for Apache Hadoop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |