Results 1 to 2 of 2
  1. #1
    adil_fastian is offline Member
    Join Date
    Apr 2010
    Posts
    1
    Rep Power
    0

    Default Converting the bytes recieved from the web-server into string...

    I have developed a web-proxy server which brings in the web-pages and the web-
    objects from the remote server in a ByteArrayStream which is then sent to the
    browser after the ByteArrayStream is converted into a byte[]. I have to
    filter the response on it's way back to the browser, so i need to convert the
    byte array into string in order to parse and filter it through the string
    functions. When i convert the byte array into string or a character array the
    output that i get is garbage when i print the output onto the console.
    How do i convert the byte array into a string so that i can search the
    response string for a particular string which i have to filter.
    I am stuck in this phase and I have to develop it further. Kindly reply soon
    so that i can develop it further....

  2. #2
    sukatoa's Avatar
    sukatoa is offline Senior Member
    Join Date
    Jan 2008
    Location
    Cebu City, Philippines
    Posts
    556
    Rep Power
    7

    Default

    did you try to instantiate like this? new String( byte array[] )

    will you post the code on how did you convert the said byte array into String?
    freedom exists in the world of ideas

Similar Threads

  1. Converting to String
    By darek9576 in forum New To Java
    Replies: 1
    Last Post: 03-13-2010, 11:07 PM
  2. Is it OK to do this... (converting int to string)
    By Psyclone in forum New To Java
    Replies: 1
    Last Post: 02-16-2010, 06:51 PM
  3. Converting a String into a array.
    By taraxgoesxboom in forum New To Java
    Replies: 12
    Last Post: 02-22-2009, 06:29 AM
  4. Adding recieved items to Server repository.
    By nel636 in forum New To Java
    Replies: 1
    Last Post: 11-28-2008, 02:46 PM
  5. Converting String to Double
    By srini in forum New To Java
    Replies: 1
    Last Post: 12-24-2007, 09:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •