Problem in Downloading Word Document of very huge size

Hi Folks,
I upload a word document of 5 MB size to the server. I do hexencoding before
I upload. The problem is when i try to download the file from the server it
goes on parsing the document and it does'nt stop. It is getting stuck in
the while loop. I am using BufferedInputStream for reading the data and
storing it in a String. Even the CPU utilization stays at 100% in Task Manager.
Can any of you Suggest a solutation? Should I replace BufferedInputStream with
some other class.
Thanks in advance.
-deena

No wonder it takes long or even seems that it hangs... Your going to use incredible amount of memory within that loop. First of all you recreate your buffer every time, but then you create new string of it, and then concat it to other, which will again create new string. Stringbuffer will probably help, but it's still a waste.
try this:
byte inbuffer[]=new buffer[BUFSIZE];
byte outbuffer[]=new buffer[BUFSIZE/2];
int readed;
while ( (readed=in.read(buffer))!=0)
   hexEncode(outbuffer, inbuffer, readed); // or whatever way you do it
   out.write(outbuffer, 0, readed); // or whereever you want to put the data
}Anyway the idea is to use common input and output buffer so memory isn't wasted. This is based on a fact that InputStreams read suplied only with byte[] argument read's as much as possible from stream and return the amount of bytes read.

Similar Messages

  • I cannot download word documents. Error message says assocated helper application does not exist.

    Tried downloading word document from email. error message Associated helper application does not exist

    To open a document you must have installed an Android application for it. The file is downloaded but can be opened with Firefox, but with the specific app from Android.
    Try installing a documents app and for sure it will work.

  • How can i view a downloaded word document in pages?

    how can i view a downloaded word document in pages?   i tried to download a file, which worked, but i can't view it since i don't have word office

    Not sure what you are saying but Pages just opens Word documents, drag the Word document onto Pages' icon.
    Or open the Word document from the Open dialog.
    If you are talking about testing a Word document after you have exported it from Pages then you will need of course to have Word to open it but there are free clones of Word as well such as LibreOffice, Openoffice and Neoffice that will do that as well.
    Peter

  • Early watch alert - problem with generating word document

    Hello experts,
    since last week I am not able to generate word documents of early watch reports. I have access to 4 different solution manager installations (of customers) where the generation was working without problems but stops since last week.
    SAP gui starts word and the standard word sheet is loaded (SAP early watch start page) but without putting data into the sheet. At the same time I get an error message in the sap gui saying:
    Error during download; read details in long text
    Long text:
    Message no. DSVAS824
    Diagnosis
    The application was unable to write a file to a local directory.
    Procedure
    Often the maximum length of 128 characters for the entire file name, which is defined internally, is exceeded. To avoid this problem, you can change the setting.
    To do this, open Microsoft® Word.
    For English interfaces, choose Tools->Options->File Locations->User templates.
    For German interfaces, choose Extras->Optionen->Speicherort für Dateien->Benutzervorlagen.
    Recommendation: Use directory names with a maximum of 60 characters (For example  C:Program FilesMicrosoft OfficeTemplates)
    I have already maintained the path in word options (we use Word 2007). My colleagues have the same problems.
    Any ideas or hints? Thank you in advance.
    BR, Basti

    Hi all,
    SAP is aware of this problem and is working on a fix.
    For a ***temporary workaround**
    run se38
    RAGS_DSWP_SERV_CONTENT_RESET
    (De-Activate content until  26.05.2011 07:28:06
    Execute
    This will allow you to open the report on a temporary basis.

  • Problems linking to Word document

    I wrote this as a reply to a similar post last week but I'm
    afraid it got buried in the thread...part of Rick's response to
    that poster was: "2. If you are linking to Word or .PDF documents,
    there is a slight chance you will find the link actually fails for
    some reason. Yet, if you simply place focus in the address bar of
    your browser and press Enter to refresh, the document loads right
    up. Go figure. If that begins happening, let us know and there is a
    possible workaround for you."
    That is the problem I'm having--can you share the workaround
    you mention? It happens most--but not all--of the time, and only
    with the Word documents; my PDFs and web links open with no
    problem. The documents are housed on a public website. I am using
    Captivate 3 if that matters.
    Thank you for any help you can offer!
    Julie

    Hi Julie
    Here's how it's done.
    From inside Captivate 3, click File > Record/Create >
    MenuBuilder Project.
    Choose the Blank Project type and click OK.
    Click Options > Project Options...
    Configure the width and height to the smallest possible
    values. This will be 320 wide and 200 tall.
    Click OK.
    Click Insert > Clickbox.
    Type the file name of the Word document or PDF and ensure you
    click to place a check mark in the "Save file with project" check
    box.
    Click OK and you should see a dialog asking if you want to
    browse for the file. Click No.
    Size the Clickbox so it covers the entire project area.
    Click File > Export.
    Save the project using any name you like. I frequently do
    this and just use "Untitled" as that's what it suggests.
    Choose Flash Movie as the type of project and click Next
    >.
    Type a name to identify the .SWF and choose an easy to
    remember location. I often use the Desktop.
    Click Finish.
    Close MenuBuilder. You are finished with that (unless you
    wish to create more of these)
    In Captivate on the slide where you want the user to click to
    open the document or PDF, click Insert > Animation.
    Browse to the location where you exported the Menubuilder
    file and select it.
    What you are doing is creating a MenuBuilder output to drop
    into a Captivate project to open files. I'm not sure why or how
    it's different than the way Captivate works, but different it is.
    Hopefully this helps you out... Rick

  • Page 5 problem with some word documents (Page 4.3 fine)

    Pages 5.0 (newest version) is unable to open some of my word documents. It is impossible for me to predict which file will cause problem and the error (typical Apple) does ot help at all: "The document cannot be opened". The documents that cannot open with Pages 5.0 open with Word or Pages 4.3 ! Once opened in 4.3, I can copy the content to a blank document in 5.0, save it with no issue but it's a productivity killer!
    Anyone having the same issue?

    Laurent Seroude wrote:
    Apple must deliver a true and ROBUST update to Pages/Numbers/Keynote desktop versions instead of pushing the iCloud/Safari version.
    Good luck with that!
    If you owned iWork '09 you should still have it in your Applications/iWork folder and can use both together on Mavericks.
    Peter
    btw The count of missing features is now over 110 despite Apple reinstating a small number and we haven't bothered to count all the bugs.

  • How to download word document

    HOw to down load word document ?

    Download from where? I generally find that it's easiest to just email documents to myself and open them in a compatible app on my iOS device.

  • Can I preset the default save feature in Acrobat 10 to save a MS Word document as a "REDUCED SIZE PDF"?

    I use MS Word for Mac 2011 to create documents and quotations. I'm using Adobe Acrobat Pro 10.1.12 on a MAC. I want to save the MS Word file as a "REDUCED SIZE PDF" first, without having to first save it as a normal PDF, then re-save it as the reduced size. How would I do this?? Can this be preset as my default>

    You cannot. Because this option both takes much longer and reduces the quality of files, it has to be chosen specifically.
    In any case, when you save a PDF file from Word. this process does not involve Acrobat or Adobe software in any way.

  • When I download Word documents in Firefox, I can't save them as ".doc" and/or ".docx" files. They go to "recent documents" as ".lnk" files and I can't even cut-n-paste the info into a new Word document to fix the problem

    Details are covered in the question. There is some sort of bug in downloading files in Firefox 4.0, downloaded files simply won't exist outside of "Recent files", which upload as ".lnk". I don't seem to have this issue with IE9.

    Not in MAC mail.  In yahoo mail.  I fiddled around with it after posting, and discovered that if I saved the entire email to the desktop in HTML(?), and then opened the email, I was able to open the attachment as well.  This is a pretty roundabout way to open an attachment.  I'd much rather be able to do it in one step.  Any idea why this is happening?  A more direct way to fix?  I am not a computer person.  Just stumbled on the idea of saving it in different format.  Thanks.

  • I cannot open/download Word documents. I need to add it to applications, but the "open as" box does not pop up when I click on a link. How can I add Word to applications?

    When I click on a docx file, it works. Only a problem for older version Word and Excel files. When I click on the link, nothing happens. Word files are not listed in my "applications", but I have no way of adding it.

    %AppData% is the name of an environment variable.
    On XP that variable points to C:\Documents and Settings\<user>\Application Data\
    "Application Data" in XP/Win2K and "AppData" in Vista/Windows 7 are hidden folders, use %APPDATA% in the File name field
    See http://kb.mozillazine.org/Show_hidden_files_and_folders
    You can use Help > Troubleshooting Information > Profile Directory > Open Containing folder
    See also [[Using the Troubleshooting Information page]]

  • How can i save and download word documents on my ipad without the pages app

    Need to know how to save documents on my ipad so i can share the same version of documents between my computer and my ipad on the same network. I do not have the pages app. and Most of the documents are either pdfs of word docs. so need to be able to save them on ipad and retrieve them when i am on the move. Pls help?

    You have to have an app on the iPad that is compatible with the particular file type that you want to save, edit or share. You can look at any of the word processing apps - Pages is one, Documents to Go, Quick Office Pro - but you have to have one like that in order to save and edit Word files.
    With pdf files - iBooks will work to save them - but that's all. Other apps like GoodReader will let you annotate them.
    You have to decide which app will serve your needs best and them download them in order to save, edit and share those file types.

  • Big problem in opening word documents in Pages (iWork) ipad

    Hi I study in UNI so I mostly have to open .doc documents from my Uni website but 95% times the .doc files doesn't open properly sometimes even half of the file stuff is just missing even using pages app from iWork. Any suggestion ?. Or ipad is t a waste of money for Uni stuff ?.? I have also tried other apps from App Store but none of them works properly.

    LeopardBoy wrote:
    Or ipad is t a waste of money for Uni stuff
    I would never recommend an iPad for any serious Uni education.  You must have a laptop or other machine that can run things like MS Word most likely being used by the people grading your work.  Even for secondary education an iPad is very limiting in my view.

  • Problem with open Word Documents and Quark Documents

    Hi,
    I am getting a strange problem with OS X Server 10.4.6, running on a G4 Xserve 1Ghz.
    When working on files in Microsoft Word X and 2004 after having the file open for a few minutes if you try and save we get an error "Word failed reading from this file", or "Bad network connection".
    Also in Quark 6.52 and Quark 6.1 when trying to save a file to the server we get "File not found [-43]". It is possible to open files, and it is also possible to move files onto the share using finder without any problems. To work on documents we are having to work on them locally on the desktop then copy across once done.
    The only thing that i can think has changed is the power went off last night, which casued the Xserve to restart. These problems are occuring across all client computers so i am assuming it can only be a problem with the server.
    Does anyone have any idea what this could be, or any tests that i can do to detmine what is up with it
    Many Thanks
    Tim Pearson

    Hi David,
    I have just tried power-cycling the switches, still getting the same problem.
    I will run disk utility on the shares at lunch. I don't think this will help as it is happening on both data drives.
    I have now also updated the OS X server to 10.4.7, and have turned the access log and error log on, it is showing no errors in the error log, and i can't see anything in the access log that looks out of the ordinary.
    With Quark i can replicate the same problem every time by creating a new project, saving it, altering it and saving it again (this works), then if i alter it again and try and save it comes up with "Duplicate File Name [-48]". It is also not deleting the temporary files, for example "QXP-1055966280.qxp".
    Regards
    Tim Pearson
    Grafika Ltd

  • Downloaded word documents not being identified as originating from another computer

    Not sure if anyone else has noticed this or knows how to solve it. If you download a PDF file or Word file from the internet in Firefox 25.0, 26.0 or 27.0 (does not occur in 25.0.1) the file is not identified as originating from the internet and thus is not opened in protected view. If you download in 25.0.1 it works as intended. I also notice that files downloaded in 27.0 don’t get saved in the specified user location, but somehow defaults to C:\Users\owner\Downloads. Ideas anyone? A fresh install does not seem to change this behavior. Thanks in advance.

    On the security point:
    In the past, Firefox marked all downloads as originating from the internet so that it triggered Windows' attachment security feature. Users could disable that by setting the preference browser.download.manager.scanWhenDone to false.
    Starting in Firefox 26, zone marking of downloads is done only for executables. Users can disable even that zone marking by setting the preference browser.download.saveZoneInformation to false in about:config.
    This change was to improve performance; this mail thread has the background: https://mail.mozilla.org/pipermail/firefox-dev/2013-August/000848.html
    However, there was pushback because some nonexecutable files can be unsafe, such as ZIP archives. A change has been implemented for Firefox 29 to behave more like other browsers: if the user has the Windows default settting to zone mark downloads, they will be zone marked. See: [https://bugzilla.mozilla.org/show_bug.cgi?id=952961 Bug 952961 – Firefox 26+ does not mark downloaded non-executables as coming from Internet zone].
    I'm not sure whether that change will be uplifted to Firefox 28 (beta), but it seems as though there is enough time, so probably. However, I think there is pretty much zero chance that it could find its way into a point update for Firefox 27.

  • I am having a problem printing a word document in booklet form.

    hp officejet pro 8000 wireless connected via usb
    Windows 7 ultimate 64 bit
    office 2010
    When printing the document what gets printed is not in the order as what is on the screen.

    If you have several application having the problem in one account it is probably the Printer having the problem. Go to the user Library. On Lion you do it from the Finder > Go menu > press option key and you'll see Library in the menu. Look for plist files named com.brother.......plist. Move them to the trash.
    Restart the computer for good measure and try printing

Maybe you are looking for