> Michael McKibben wrote: > > Quick question on the usage of the SourceResolver and Source interfaces: > > I am writing an implementation of the TRAX URIResolver interface which > delegates to the SourceResolver component. It seems pretty staightforward > to call Source.getInputStream() and wrap that with a TRAX > StreamSource. The question is, is it safe now to call > SourceResolver.release(source), or must I stash this away and discard > later? I am worried that calling release would close the underlying stream > that I just returned in the wrapped StreamSource. Both the Resource and > URL source implementation don't appear to implement Disposable/Recyclable, > but I'm worried I'm relying on an assumption which may not hold for all > Source implementations. > > So is it safe so say that after I call getInputStream() on any Source > impl, I am now the owner of the InputStream and calling release() on the > SourceResolver will not invalidate this stream (how rude!)? Yes, you are the owner then - you can release the source object and use the input stream later on.
Carsten > > Thanks in advance, and sorry for all the nagging questions lately. It just > seems that I keep finding ways to use Avalon more and more these days! > > Regards, > > --mike > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
