aspose file tools*
The moose likes Servlets and the fly likes encode and decode byte array as url parameter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "encode and decode byte array as url parameter" Watch "encode and decode byte array as url parameter" New topic
Author

encode and decode byte array as url parameter

sreenivas jeenor
Ranch Hand

Joined: Jan 09, 2005
Posts: 125
What I am doing is capturing a biometric information ,returns a byte[] so I needed to convert it from
byte[] to a string that I could set as a url parameter and passing it as url parameter, so &m=(biometric info).

in the receiving servlet , i am able to decode to string.
my question is how how to get the actual byte array value in the servlet.

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39535
    
  27
Base-64 encoding (which the Apache Commons Compress library can handle) turns a byte[] into something that can be passed around as part of an URL. Keep in mind that URL parameters may be limited in length; you shouldn't assume that you can use more than 1KB or so.


Ping & DNS - updated with new look and Ping home screen widget
 
Don't get me started about those stupid light bulbs.
 
subject: encode and decode byte array as url parameter
 
Similar Threads
Decoding "%5c"
Display PDF in IE from byte array using Servlet
returning an array from servlet responce
How to use java to invoke an external webservices (soap, soap1.2)?
ksoap receiving image as byte array