| Author |
encoding with URLEncoder
|
mandar kharat
Greenhorn
Joined: Feb 08, 2002
Posts: 4
|
|
|
I am trying to encoding a large data(2.5MB) with URLEncoder class. But there is not output from the class,i.e. String. Is there any restriction for the size of data Encoding with this class. Has anyone come across this problem?
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56221
|
|
You didn't mention why you were trying to do this. The only reason to URL encode something is to be able to use it as part of a URL. Now, if you are trying to pass a 2.5M string as a request parameter encoded in the query string of a URL as part of a GET, well, that's way too large. What exactly are you trying to accomplish? bear
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
mandar kharat
Greenhorn
Joined: Feb 08, 2002
Posts: 4
|
|
|
I am trying to do this to send the data over the wire, to another servlet with HttpUrlConnection . I am transmitting this data after establishing a connection with this remote servlet, for that reason I have to encode this data using URLEncoder.
|
 |
Mike Curwen
Ranch Hand
Joined: Feb 20, 2001
Posts: 3695
|
|
Bear, you were confusing the EncodeURL() method of the HttpServletResponse with the java.net.URLEncoder class. mandar, I'm not really sure you need to use URLEncoder. If the 2.5MB file you are sending has a ' ' (space) character in it, does it make sense to turn this into a '+' character? You'd only have to use URLDecoder at the other end. Maybe it's a requirement to encode anything going over HTTP, but I thought that sending files as a stream of bytes "as is" was acceptable.
|
 |
 |
|
|
subject: encoding with URLEncoder
|
|
|