You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by Nick Lothian <nl...@educationau.edu.au> on 2005/08/11 08:17:37 UTC
RE: extend java.net.URL?
>
> Hi, All,
>
> I need to extend java.net.URL, in order to handle newer/more schemes.
> The problem is that java.net.URL is final, not meant to be subclassed.
> Since URL is extensively used in nutch, I am also reluctant
> to replace every one with my own MyURL. It seems I will have
> to hack java.net.URL source directly. This is not portable
> though. I am wondering if there are better alternatives, or
> some tricks can be applied.
>
> Thanks,
>
> John
>
Do pluggable protocol handlers do what you want? (eg:
http://java.sun.com/developer/onlineTraining/protocolhandlers/)
Nick
Re: extend java.net.URL?
Posted by Dawid Weiss <da...@cs.put.poznan.pl>.
Pluggable protocols work quite nice. I remember I created a pluggable
protocol for opening application resources once; worked like a charm.
D.
John X wrote:
> On Thu, Aug 11, 2005 at 03:47:37PM +0930, Nick Lothian wrote:
>
>>>Hi, All,
>>>
>>>I need to extend java.net.URL, in order to handle newer/more schemes.
>>>The problem is that java.net.URL is final, not meant to be subclassed.
>>>Since URL is extensively used in nutch, I am also reluctant
>>>to replace every one with my own MyURL. It seems I will have
>>>to hack java.net.URL source directly. This is not portable
>>>though. I am wondering if there are better alternatives, or
>>>some tricks can be applied.
>>>
>>>Thanks,
>>>
>>>John
>>>
>>
>>Do pluggable protocol handlers do what you want? (eg:
>>http://java.sun.com/developer/onlineTraining/protocolhandlers/)
>
>
> Hi, Nick,
>
> How could I have missed that! That's the one. Thanks a lot.
>
> John
>
>
>>Nick
>>
>
> __________________________________________
> http://www.neasys.com - A Good Place to Be
> Come to visit us today!
Re: extend java.net.URL?
Posted by John X <jo...@neasys.com>.
On Thu, Aug 11, 2005 at 03:47:37PM +0930, Nick Lothian wrote:
> >
> > Hi, All,
> >
> > I need to extend java.net.URL, in order to handle newer/more schemes.
> > The problem is that java.net.URL is final, not meant to be subclassed.
> > Since URL is extensively used in nutch, I am also reluctant
> > to replace every one with my own MyURL. It seems I will have
> > to hack java.net.URL source directly. This is not portable
> > though. I am wondering if there are better alternatives, or
> > some tricks can be applied.
> >
> > Thanks,
> >
> > John
> >
>
> Do pluggable protocol handlers do what you want? (eg:
> http://java.sun.com/developer/onlineTraining/protocolhandlers/)
Hi, Nick,
How could I have missed that! That's the one. Thanks a lot.
John
>
> Nick
>
__________________________________________
http://www.neasys.com - A Good Place to Be
Come to visit us today!