• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

encode and decode byte array as url parameter

 
Ranch Hand
Posts: 125
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic