Package com.saperion.common.io
Class InputStreamDescriptor
java.lang.Object
com.saperion.common.io.InputStreamDescriptor
- Direct Known Subclasses:
ContentStream
A simple class containing a
URL
for an InputStream
. The url
defines
the streams
location
. While the stream itself
must be given (must not be null) the url may be omitted.- Author:
- agz, jsc
-
Constructor Summary
ConstructorsConstructorDescriptionInputStreamDescriptor
(InputStream inputStream) InputStreamDescriptor
(InputStream inputStream, URL url) -
Method Summary
Modifier and TypeMethodDescriptionGets theInputStream
this instance holds information about.getUrl()
Gets an url that defines the streams location.protected void
setInputStream
(InputStream inputStream) Sets theInputStream
this instance holds information about.protected void
Sets the url that defines the streams location.toString()
-
Constructor Details
-
InputStreamDescriptor
-
InputStreamDescriptor
-
-
Method Details
-
getInputStream
Gets theInputStream
this instance holds information about.- Returns:
- the
InputStream
this instance holds information about.
-
setInputStream
Sets theInputStream
this instance holds information about. WhileInputStreamDescriptor
itself does not change itsInputStream
it does allow subclasses to change it, but still assures that theInputStream
is not null.- Parameters:
inputStream
- TheInputStream
this instance holds information about. Must not be null.
-
getUrl
Gets an url that defines the streams location.InputStreamDescriptor
does not guarantee that a call to getUrl().openStream() returns a stream to the same binary data. It does not guarantee nor require that the url is not ambiguous e.g. a "file://"- url for a remote stream.- Returns:
- an url that defines the streams location.
-
setUrl
Sets the url that defines the streams location. WhileInputStreamDescriptor
itself does not change itsURL
it does allow subclasses to change it.- Parameters:
url
- The url that defines the streams location.
-
toString
-