Re: Saving images



Marcelo wrote:

However I have another problem. whenever I have a URL like this:

www.whatever.com/jni/images/im.gif
This is not a legal URL. You probably mean
  http://www.whatever.com/jni/images/im.gif
or more exactly the constructed URL object:
  new URL("http://www.whatever.com/jni/images/im.gif";)

How Can I have the directory

www.whatever.com/jni/images
Class java.net.URL has some handy methods (described in the API doc) for getting the parts: getProtocol(), getHost(), getPath(), ...
Choose what you need.

without doing regex stuff?
Don't break a fly on the wheel. String.index('/') and String.substring(...) will be sufficient.

--
"Thomas:Fritsch$ops:de".replace(':','.').replace('$','@')

.