Problem saving gif file over the net

I am using a simple loop to save files using a URL Connection. It grabs html files fine and they look right but when I used to to download an animated gif it had an error. It saved the file but when I tried to open the image I got a "drawing failed" message.
I compared it to the working image and the sizes were identical. I also compared the characters in notepad and the beginning and end characters were identical. I looked at the preview in "My Computer" when you select it and it drew only the first line or so. This makes me believe it is a problem with how it switches lines when saving. I checked the ends of the lines though and they also seem identicall. Any ideas? Here is the code. Thankyou.
FileWriter fileName = new FileWriter(saveFileName);
BufferedReader in = new BufferedReader(
new InputStreamReader(
newConnection.getInputStream()
BufferedWriter out = new BufferedWriter(fileName);
for (;;) {
int data = in.read();
// Check for EOF
if (data == -1) break;
else {
System.out.print ( (char) data);
out.write(data);
}

GIF files are binary files and can be corrupted if you use the Reader and Writer classes. Use the *Stream classes, like FileInputStream and FileOutputStream.                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • I try to generate a chm file over the net and I get a compiling error message

    Hi all,
    I am trying to generate chm files over the net, and the same project when I am generating the same chm locally works fine, however when I am attempting to generate the same chm on a network location, it gives me a compiling error and aborts the generation. It is also keeping the chm file open afterwards, so I have to reboot the machine.
    It is RH7 working on a Windows XP Pro 32 bit.
    Thank you

    It is not a project issue. RoboHelp is just not designed to work that way but like a lot of things, some people can use them outside what they were designed for. However, just because some people can work that way, it does not follow everyone can.
    I've seen people with projects on a network and they say have been doing it for years so it must be OK. A while later they come back and say the problem is fixed since moving it locally.
    Sorry but it looks like you are stuck with working the way you do or getting your colleague to do it. It might be as simple as he is on a different bit of your network.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • HT5678 I have problems saving pdf files in the web when I use Safari. I don't have this problem with firefox

    I have problems saving pdf files in the web when I use Safari.  I don't have this problem with firefox.

    do they save ok if Safari - Preferences - Security - Allow all other plug-ins is unchecked ?
    If so, likely an adobe or other pdf plugin
    Re-check the setting above & quit any browsers,
    Look in this folder by triple-clicking the line below, then ctrl-clicking it & choosing Services - Open
    /Library/Internet Plug-Ins/
    remove anything with pdf in the filename & test again
    Sometimes, plug-ins can be in the User Library folder :
    ~/Library/Internet Plug-Ins/

  • Can anyone advise on how to share large files over the net?

    Hi all.
    So I need to share large video files over the net.
    The files will be between 5 and 10 GB
    Does anyone have a solution for this?
    I have been using my ftp program and just giving the recipient the download link.
    But its affecting my upload quota and the recipients download quaota with our ISP's.
    Is there an easier way at all?
    Thanks.

    Contact the ISP for a temporary exception on the quota, or to get an explanation of how long before you can send a second segment for the download.  You can split large downloads by UUEncoding them, or making separate disk image segments with Disk Utility.  You could also find out if any local WiFi hotspots don't have a quota issue.  Lastly, you could send a thumbdrive by mail.

  • Problem saving .gif files

    I've been making gifs forever and until now everything stopped working. I reset my Photoshop settings with Ctrl+Alt+Shift but that didn't help. I also updated too. Then I uninstalled the entire program and reinstalled and still the same problem. What the problem is, is that when I go to 'Save for Web' I have all my correct settings imputed, then it gives me this like nothing is found. I don't quite understand what's going on. This never happened to me ever! If anyone knows or can suggest something please!Thank you!
    Btw after I try to save it a second time my Photoshop just freezes and I have to manually close it
    Please click the link for the image to show you
    http://www.imagebam.com/image/1f15b9318649734][IMG]http://thumbnails112.imagebam.com/31865 /1f15b9318649734.jpg[/IMG][/URL]

    OK, the problem shown in the image is the display of the folders and files in the save as dialog box.
    Does this happen when you use the normal save as dialog box? Are you able to save psd, jpg, and tiff's?
    At the moment it is looking like an OS issue. Run virus program and a disk check. Don't let the disk check fix any issues unless you are absolutely sure you backuped your drive first. I have had the disk check distroy my directory tree to a point I needed to reformat. They claim it is safe, I can assure you it can be a nightmare if you don't backup first.

  • Problem saving mp3 files from the internet

    Hi
    I'm having problems saving mp3's from internet sites. Whenever i find an mp3 which I wanna download, and I press the ctrl button as choose "save as", it oly saves as an internet link file ( called something like web.archive) does anyone have an idea how i solve this problem? Another thing is if i click the mp3 file it opens in quicktime, but there is no save as options..
    Best Regards
    Mark

    No that is not the problem, it works with windows and I have done it before, just not with a mac

  • Problem in running servlets over the net & in non-root user mode(FC-4)

    I have installed Tomcat 5.0.28 and it is running
    successfully in Fedora core 4,I wrote a servlet,to access a mysql database and it is running correctly,but when i logged
    onto non-root user, when i call the servlet through the
    html page i get "page not found error" .This is happening even when i do it from other system.
    I thank in advance if any could help me in this case

    Did you try using %20 instead of a space?  I know it works for URLs...worth a shot.

  • How do i transfer files between two macs over the net (FTP)

    Hi,
    Couldn't find a thread like this, apologies if its been discussed already recently, I'm trying to enable two iMacs both Intel, both running 10.4.10 to be able to swap files (quite large 350MB) over the net just using Tiger.
    We both have .Mac accounts but the files only upload properly to our iDisk 1 out of 3 times and its getting annoying, I basically want my mate to be able to drag a file off my HD onto his via the net using no other programs just Tiger, is this possible?
    If not, what's the best free program to use.
    Thanks

    You'll have to get an FTP client as the Finder only reads, not writes to an FTP server. I can't suggest a free one. You will also need to open your computers up to the world. If you don't know how to do that, search for Port Forwarding and your particular router. You'll have to open up port 21 for FTP.
    Plain old FTP is not very secure, so you shouldn't leave it open all the time. SFTP is Secure FTP, and you can use Fugu to use it. You'll still need to set up Port forwarding, but you can pick whatever port number you want. Fugu lets you pick the port number. You should set up standard users on each machine and make a sftpTransfer folder in the /Users/Shared/ folder. This will allow each of you to access the files. sftp allows anyone to see the directory structure, but still maintains the permissions from OS X. So, as standard users, you can look into each other's Home folder, but you won't be able to get into the subfolders or transfer files to or from any unshared locations.
    By the way, I wrote an entire post describing how to use sftp from the command line before I decided to look for a client app for you. Then I found Fugu and changed it all.
    Edit:
    I forgot to mention you must turn on Remote Login in the sharing pane, and you'll have to use port 22 as this is the only one Mac OS allows remote connections on.
    Message was edited by: Barney-15E

  • Crashing When Saving Photoshop  File Over Network

    Photoshop & InDesign CS3 crashes whenever I try to save a file over the network to a another shared Mac Pro computer. Another Mac Pro on the network can save to the shared computer without a problem.
    SPECIFICS
    - Three Macs and a 3 PC's on Ethernet network
    -Problem started after upgrading to Leopard
    - I have tried reinstalling the entire Creative Suite without Version Cue
    - Tried deleting the com.adobe.mediabrowser.p.ist and Photoshop.plist preferences.
    - If I create a new file on my computer and then immediately save it, it usually does not crash on the first save. But after I do a few things to the file and then try to save again, it hangs up giving me the spinning pinwheel with the message in the Force Quit dialog window that Photoshop is not responding.
    +- I am unable to force quiet Photoshop; I have to do a hard reboot.+
    Adobe tech support believes it is a network problem, any ideas what might be causing the problem?
    Are there any know issues with Leopard and CS 3 with certain network configurations?

    I have experienced issues with saving photoshop files over a network since upgrading to 10.5.3
    This is a major issue, and one that apple seems quite about.
    See related response on Adobe.com
    http://kb.adobe.com/selfservice/viewContent.do?externalId=kb403815&sliceId=2

  • Unable to access gif files from the server

    hi all,
    i have successfully signed an applet and it is loading in the client system also. in that applet, i instantiated a jbutton as given below:
    JButton jb = new JButton(new ImageIcon("http://192.168.91.154:8080/success/set.gif"));
    but the icon din appear and a blank button appears, even when accessed from the server system.
    if i give the exact path like c:/blazix/webfiles/success/ set.gif, the icon is coming in the server system but not in other systems. i tried without port no also but in vain. pl solve my problem. what i need is how to
    specify the path of the file[any file] which is present in server.
    or if i put all the gif files in the jar file, can i access the gif files present in the jar file [set for archive] ? if i can, give me the soln for accessing the gif file present in the jar file, so that i need not access the server to get the gif files.(i.e) how to specify the path of the gif files present in the jar file?
    i ve one more doubt. the jni library file shld be in the server, and the client has to access the library in the server. i think the applet loaded in the client ll search for the library in the local m/c only . how to make the applet to search for library in the server??
    i feel only by using rmi we can solve this problem. am i correct? if so i feel that an appln or applet running in the server shld access the jni library, and the applet in the client side should communicate with this server appln using rmi to get the data.is it correct? is there
    anyother way?
    i appreciate your help in this regard. thanks in advance. bye, padmanbhan.

    Better information on what you are doing with JNI might help you get an answer.
    If you have some server process that needs to use JNI, then I would code a servlet to call, instead of using RMI to ge there.
    Depending on your environment, and the target audiences environment, RMI may just cause you a lot of grief. Firewalls etc, get in the way of RMI connections and force security holes to be opened in order to work.
    If you use a servlet, then traffic to your server process is done via standard http calls, which will already be enabled, because your app runs in a browser.
    If ther data requirements are heavy duty, your server could always send an XML stream to the client, which would allow you to describe complex data to the client.
    Running JNI stuff from the client directly means a lot of local infrastructure to run your app. The code you want to run, the JNI library ....
    If what you have is really an application, but want the convenience of starting it from a browser, look at Java WebStart. Then you can distribute an application via the browser, and WebStart will worry about the deployment issues for you.
    In Summary:
    Stay away from RMI from applets if you can help it.
    If you really have an App, then try WebStart to manage the distribution issues for you.

  • Unable to share files over the local network, OS X Lion

    About two weeks ago, my coworker and I realized that we were no longer able to share files over the local network. We have not made any changes to our preference settings. We are able to access FileMaker Pro databases files located on another computer in our office via the network, but we are unable to access any other files by trying to login to the computer remotely. We also have internet access. I am able to login to each of our work computers form home, but not from the office. I'm am not sure what has changed, but it is important that we have the ability to share files at work. Can you give me directions on how to fix our problem. Thanks!
    Debbie Roberts
    Univesrity of Texas at Austin

    I had this problem when I first setup my Mac. One thing I know is that File Sharing in System Preferences doesn't necessarily need to be on, because iTunes does all of the networking itself.
    I know that you've checked and checked again on the firewall, but what I did was turn the firewall on. In the list of ALLOW, there should be a line that is labeled iTunes Music Sharing. Check it. It was the magic link, and all of my iTunes libraries on the three computers in the house (two Windows, one my Mac) could "see" each other.
    Turning on the firewall might seem strange, but it worked for me.
    I hope this helps.
    MacBook Mac OS X (10.4.9)

  • Screen sharing over the net. Is it possible.

    I was wondering if someone with screen sharing abilities could help out. I was wondering. Is it possible to share screens over the net. For example, my mom is like a 100 miles away. Running Leopard. How could I access her screen so that I could show here what to do. Heres the states, her computer has a router. My computer has a router. How can we sharing screens. Where would be long into and how. I know of the program in System/corservices/screensharing When I click it it asks for host. I dunno if that was the right way to go but any help here would be amazing. Thank oyu.

    It is possible apparently, but if there is a router in the equation, that may well cause problems. If your Mom is using a Mac, this screen sharing facility is also available via iChat.

  • Corporate Win7/Office 2010 | Severe Lag when opening Office 2010 files over the network

    Good Evening Everyone,
    I work in a corporate environment for one of the top banks in the country (USA). We recently upgraded our computers to Windows 7. (The image has office 2010 included in the build)
    I've been experiencing some severe lag when opening Office files over the network. Let me start by saying I've researched a lot and have yet to find a solution that works or even makes much of an improvement. 
    Notes: My laptop is new (64-bit Win 7 Enterprise). The remote desktop where the files lie is new as well. (64-bit Win 7 Enterprise) Both computers have good hardware and more than enough juice to handle applications. 
    There are certain files I work on along with other co-workers that we store on a computer within the office. We simply create shortcuts to the files on our local machines and make changes, etc. from there. However, after this upgrade, every time I try to
    open a file on the remote computer, it takes over a 1 minute to load. I've spoken to our support team who sent someone out and confirmed it's not the network. 
    Both computers are on the same subnet as well. I've changed the trust center settings on both the client computers and "server" to trust any computer on the network. I have also changed the network card's speed from "Auto Negotiate" to
    full duplex 100mbps with no luck.
    I am out of options here and in desperate need for a fix. Even saving changes to a file we work on takes forever. 50% of the time when I close a spreadsheet, the title bar has a not responding message and takes a minute to eventually close. 
    PS: Extra Info : All computers run McAfee AV and use McAfee for disk encryption. I've confirmed all computers are up-to-date in every respect with the AV software. 
    Thanks,

    Try: 
    Open My Computer.
    Open the Tools menu and choose Folder Options...
    Select the File Types tab.
    Select the extension (for example DOC, or XLS) of the file that is slow to open.
    In the Details section, click [Advanced], and another dialog box will open. 
    In the Actions section, click Open then click [Edit...], and another dialog box will open.
    http://windowssecrets.com/forums/showthread.php/149672-10-9-2012-Updates-and-very-slow-opening-of-Office-files
    KR

  • Multiple Upload Image Problem - Resize GIF files

    The Multiple Image Upload script seems to handle .jpg images without problems.
    However, .gif files return the error:
    "Error converting image (image resize). Image processing library not available or does not support operation. (imagemagick library is not working or not found)."
    The problem is caused by the fact that script that I'm using tries to pass a parameter that is not valid for gif processing:
    myimage.gif' '-quality' '80'
    The "quality" parameter works only for jpeg and .png files as described here:
    http://www.imagemagick.org/script/command-line-options.php#quality
    Please ensure that the script makes difference between .gif and .jpeg files and use the correct parameters so we can resize the images properly.
    Thanks in advance,
    Márcio

    Hi Marcio,
    >>
    Can you tell me the inconveniance of using GD instead of Imagemagick, or its, shortly similar?
    >>
    sorry, but never worked with ImageMagick so far, so I can´t compare
    >>
    The "quality" parameter works only for jpeg and .png files as described here
    >>
    yeah, it seems that this is a small bug in ADDT´s "includes/common/lib/image/KT_Image.class.php" file. Was just checking the code in there, and indeed it adds this extra parameter regardless the image type -- but I do have an idea how this file can be modified to not use this parameter if the file in question has the suffix ".gif".
    If you feel a little adventurous, I´ll happily invite you to modify some code in this file -- please let me know if you´re ready for some instructions. However, if so, please make a backup of this file first...
    Günter Schenk
    Adobe Community Expert, Dreamweaver

  • How to download a file from the net and save it into .txt format in a datab

    Can some one show me a tutorial on how to download a file from the net and save it into .txt format in a database?
    Thank you,

    http://java.sun.com/docs/books/tutorial/networking/urls/readingWriting.html

Maybe you are looking for

  • Making Adobe Reader work with Mac OS 10.6.4

    I am about ready to give up... I have OS 10.6.4. I have loaded the proper version of adobe reader 9.3 and upgraded with 9.3.1; 9.3.2; and 9.3.3 but still cannot read a PDF file. All attempts to open result in the same error message: "There was an err

  • Weird Radio button issue on Insert/Update form

    I recently installed Dreamweaver CS4 and am having a heck of a time with radio buttons on my Dynamic Insert/Update form. For some reason, when I update a record, the radio button I had previously selected, is NOT checked.  However, the value is in th

  • Where can I purchase Apple TV 3rd gen power cord?

    Hi.  Where can I purhcase a power cord for my Apple TV 3rd generation (released in 2012)?  I don't see it on apple.com or amazon or ebay. Weblinks would be very helpful in your reply. Thanks!

  • Z movement types for subcontracting

    Hi Experts I am creating zmovement types for my subcontracting process,941,942,943.i am successfulyy send the material with subcontracting vendor with 941 movement.when i am doing GR for with 101movement type for subcontracting material.the 543 movem

  • Safari in 10.5.2 is making my computer useless.

    Back before Leopard, Safari used to bring my computer to a crawl. The villain seemed to be Flash, but I was never sure. I just started using Firefox and that mostly solved the problem. Now, with 10.5.2, the problem has returned. Safari starts up fine