Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6022465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:51:42+00:00 2026-05-23T03:51:42+00:00

In my program, I have a web application that creates a PNG image. This

  • 0

In my program, I have a web application that creates a PNG image. This PNG image is written to a file and returned in a request. When I write the request to a file, it is different than the one that was originally written to the harddrive when they should be exactly the same. The PNG from the response is just a blank image. (it is corrupt i guess).

I used a binary diff program to diff the two PNG files and found that some of the characters in the response PNG were just replaced with hexadecimal value 3F instead of their real values.

Here is an image of the diff:
Diff Image

It seems as though the response is making some of the HEX values into 3F, why is this? And is there a way to make it stop doing this.

To be more specific about how that response was created, a FileRepresentation (from RESTlet) was used to get the PNG file and put it in a response. I used the RESTlet file type MEDIATYPE_PNG.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T03:51:43+00:00Added an answer on May 23, 2026 at 3:51 am

    I have found the problem. I was accessing the response in the wrong way. by using response.getEntity.getText() it does not give an accurate string representation as some of the values from the file are not part of the ascii range. It replaced “?” with those values that are not in the ascii range.

    So instead I just got a byte stream by using response.getEntity().getStream() from it and everything works fine.

    Thanks all!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ASP.NET program where i am downloading a file from web using
I have a program that creates a Windows user account using the NetUserAdd() API
I have a web service I'm trying to load test. I created a program
in a C program I have an long* that I want to serialize (thus
I have a program that spits out both standard error and standard out, and
We have a large suite of products that include: Desktop apps written in VB6.
I have a LAMP (PHP) web app which need to interface with programs on
Most program languages have some kind of exception handling; some languages have return codes,
In my program I have one array with 25 double values 0.04 When I
Okay here's the program I have typed up(stdio.h is included also): /* function main

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.