whois-server-list / public-suffix-list

Java API for Mozilla's Public Suffix List
Do What The F*ck You Want To Public License
47 stars 14 forks source link

unable to load public suffix list from location outside of classpath #6

Closed jgangemi closed 8 years ago

jgangemi commented 8 years ago

i would like to be able to load the public suffix list from an external location on disk and not the classpath but this is not currently possible b/c the underlying code is using getResourceAsStream to load the file.

can this be changed and/or enhanced to support my use case?

the simplest thing to do would be to check if the InputStream returned from the call is null and if yes, try loading the file using a FileInputStream.

i'd be happy to submit a pull request for this.

malkusch commented 8 years ago

I'll have a look at it. In the mean time you could change your class path to include the file.

malkusch commented 8 years ago

Added PublicSuffixListFactory::build(InputStream) in 2.1.0.

jgangemi commented 8 years ago

awesome, thanks for this!