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 theInputStreamthis instance holds information about.getUrl()Gets an url that defines the streams location.protected voidsetInputStream(InputStream inputStream) Sets theInputStreamthis instance holds information about.protected voidSets the url that defines the streams location.toString()
-
Constructor Details
-
InputStreamDescriptor
-
InputStreamDescriptor
-
-
Method Details
-
getInputStream
Gets theInputStreamthis instance holds information about.- Returns:
- the
InputStreamthis instance holds information about.
-
setInputStream
Sets theInputStreamthis instance holds information about. WhileInputStreamDescriptoritself does not change itsInputStreamit does allow subclasses to change it, but still assures that theInputStreamis not null.- Parameters:
inputStream- TheInputStreamthis instance holds information about. Must not be null.
-
getUrl
Gets an url that defines the streams location.InputStreamDescriptordoes 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. WhileInputStreamDescriptoritself does not change itsURLit does allow subclasses to change it.- Parameters:
url- The url that defines the streams location.
-
toString
-