Printing the percentage of the file that has been loaded

Hello everyone!
I'm using a FileInputStream and a DataInputStream to read my .DAT file, but I want to print out the amount of percentages of the file that has been loaded, in a System,out.print(""); statement, please tell me how I can do this. :)
            fileInStream = new FileInputStream("C:/Documents and Settings/Benjamin Dahse/Dokumenter" +
                    "/NetBeansProjects/Online Multiplayer Game Client/build/classes/net/client/game/io/Cache/" +
                    "main_file_cache.DAT");
            dataInStream = new DataInputStream(fileInStream);This by the way, is how I get the path to the file, I want my DataInputStream to read.

Thank you for your comment, but out of this code:
            int percentage = 0;
            byte[] buffer = new byte[15000000];
            while(true){
                percentage += dataInStream.read(buffer, percentage, Math.min(buffer.length,
                        fileInStream.available() - percentage));
                System.out.print(percentage / fileInStream.available() + "\n");
                if(percentage >= fileInStream.available()){
                    break;
            }The only output I get is 3?

Similar Messages

  • I cannot and never have been, able to open a file that has been previously saved to hard disk by choosing the print to file option in the print dialogue box

    '''I cannot and never have been, able to open a file that has been previously saved to hard disk by choosing the print to file option in the print dialogue box. Firefox displays gooblygook even though the file name is an html, Windows Notepad crashes, MS Excel does not recognise the file type. MS Word displays goobblys also when the file has no filename extension.'''

    If you use print to file then you get a file that is meant to be send to a printer and that file has all kind of formatting code for that specific printer.
    Opening such a file in Firefox or a text editor can only work if you use a text only printer to print the file to, so make sure that such a printer is installed and selected.

  • I'm using acrobat pro in my project after debuging the project and after opening a certain number of PDF files I receive the message: the maximum number of files opened has been reached, you have to close some files to continu.even doing that, I steel rec

    I'm using acrobat pro in my project after debuging the project and after opening a certain number of PDF files I receive the message: the maximum number of files opened has been reached, you have to close some files to continu.even doing that, I steel receive the same message.Some one can tel what to do please? Thanks

    Hi Memalyn
    Essentially, the bare issue is that you have a 500GB hard drive with only 10GB free. That is not sufficient to run the system properly. The two options you have are to move/remove files to another location, or to install a larger hard drive (eg 2TB). Drive space has nothing to do with SMC firmware, and usually large media files are to blame.
    My first recommendation is this: download and run the free OmniDiskSweeper. This will identify the exact size of all your folders - you can drill down into the subfolders and figure out where your largest culprits are. For example, you might find that your Pictures folder contains both an iPhoto Library and copies that you've brought in from a camera but are outside the iPhoto Library structure. Or perhaps you have a lot of purchased video content in iTunes.
    If you find files that you KNOW you do not need, you can delete them. Don't delete them just because you have a backup, since if the backup fails, you will lose all your copies.
    Don't worry about "cleaners" for now - they don't save much space and can actually cause problems. Deal with the large file situation first and see how you get on.
    Let us know what you find out, and if you manage to get your space back.
    Matt

  • How do I edit the text in a pdf file that has been converted to a Word doc

    How do I edit the text in a pdf file that has been converted to a Word doc?

    Hi BridgetteJean,
    Please go through this video this explains how to edit text in a pdf document.
    http://tv.adobe.com/watch/acrobat-tips-and-tricks/editing-text-with-the-typewriter-tool/

  • ALBPM 6.0 : The maximum size for file uploads has been exceeded.

    Hi,
    I use AquaLogic BPM Entreprise server to deploy my Process. When I try to publish a process on my server I get the following error:
    An unexpected error ocurred.
    The error's technical description is:
    "javax.servlet.jsp.JspException: null"
    Possible causes are:
    The maximum size for file uploads has been exceeded.
    If you are trying to publish an exported project you should publish it using the remote project option.
    If you are trying to upload the participant's photo you should choose a smaller one.
    An internal error has ocurred, please contact support attaching this page's source code.
    Has someone resolve it?
    Thank's.

    Hi,
    Sure you've figured this out by now, but when you get the "Maximum size for file uploads" error during publish consider:
    1. if your export project file is over 10mb, use "Remote Project" (instead of "Exported Project") as the publication source. That way when you select the remote project, you will point to ".fpr" directory of the project you are trying to publish.
    Most times your project is not on a network drive that the server has access to. If this is the case, upload the .exp file to the machine where the Process Administrator is running, then expand it in any directory (just unzip the file). Then, from the Process Administrator, use the option to publish a Remote Project by entering the path to the .fpr directory you just created when unzipping the project.
    2. Check to see if you have cataloged any jars and marked them as non-versionable. Most of the times the project size is big just because of the external jar files. So as a best practice, when you do a project export select the option "include only-versionable jars", that will get reduce the project size considerably (usually to Kb's). Of course you have to manually copy the Jar files to your Ext folder.
    hth,
    Dan

  • How to get PDF file that has been transformed into docx into my filing system so I can work on it???

    How can I get the PDF file that was transformed into a docx file into my filing system to be able to work on it and translate it as the customer requested?

    THanks for your reply.
    Well what happens is I bought the program. It gives you a button to click,
    you log in and then a box opens up asking you to select the file, I go into
    my filing system (in Windows explorer) select the file, and the program
    converts it into docx, my choice.  I can read it there and when I try to
    copy and paste it into my file where the PDF version is saved, it behaves
    like an "image", and I can't save it.... or it saves likes something you
    save on the internet, so you have to go into internet every time you want
    to see it.    I have also pressed any amount of buttons to see if it will
    give me the option to save it any other way, and have found nothing.  What
    I would need is a file in docx.format that I can edit.  People send me
    things in PDF and sometimes I can just copy it off the PDF file and save it
    in WOrd, then I can translate it for them. But sometimes the PDF file
    doesnt allow me to copy the text.  If it is in image form, I cannot work on
    it.  It means printing it, so I can copy type it into Word... and for that
    I certainly wouldnt need to buy a program.  Its just double the work and
    ends up that the job takes twice as long.!
    Sorry  if I am a bit dumb with informatics.  But I simply could not find
    any way whatever to  copy the PDF file that was transformed into Word, in a
    format that would enable me to edit it.
    Kindest regards,
    Margery
    2013/12/2 Test Screen Name <[email protected]>
        Re: How to get PDF file that has been transformed into docx into my
    filing system so I can work on it???
    created by Test Screen Name<http://forums.adobe.com/people/TestScreenName>in *Adobe
    ExportPDF* - View the full discussion<http://forums.adobe.com/message/5890871#5890871

  • I can't get gold of adobe - which is annoying me. I have a file that has been uploaded to my creative cloud that i did not upload or have i ever seen before. SO it seems adobe cannot guarantee security and are uncontactable - i think i may leave

    I can't get gold of adobe - which is annoying me. I have a file that has been uploaded to my creative cloud that i did not upload or have i ever seen before. SO it seems adobe cannot guarantee security and are uncontactable - i think i may leave

    Since this is an open forum, not Adobe support... you need Adobe staff to help
    Adobe contact information - http://helpx.adobe.com/contact.html
    -Select your product and what you need help with
    -Click on the blue box "Still need help? Contact us"

  • Changing a number in an excel file that has been changed to a PDF

    Changing a number in an excel file that has been changed to a PD ?

    Hi llkwx,
    I would like to confirm ,do you want to change the page number of the PDF  or any other number in the data given in that PDF?
    For changing the page number display
    You can select Page Thumbnail option from the left hand side .In that panel ,right click and select the option "Number Pages" from the drop down menu.You can further change the page numbers as per your requirement.
    Adding page numbers to PDF
    Tools>Pages>Edit Page Design>Header and Footer>Add Header and Footer>click Insert Page Number
    Do write us back with your response .We will be glad to help you out with your queries.
    Regards
    Sukrit Dhingra

  • How do I fix or open a corrupted file that has been corrupted by some sort of programmatically email

    How do I fix or open a corrupted PDF file that has been corrupted by some sort of programmatically emailing?
    Please see the following screen shot:
    http://i67.photobucket.com/albums/h292/Athono/pdfproblem_zpsbd9bdc00.png

    Well, it is a pdf file, and it once was a readable one, I suppose.
    It must have data on the hex or binary level that can be retrieved. 
    If necessary, I will have to look into the file format of a PDF file?  Is this documented?

  • I do not get a readable or editable PDF file that has been converted to Microsoft Word.

    In the past I have been able to convert PDF files to MicroSoft Word, and Edit and Save the Documents. Now, the converted files are unreadable and uneditable. How do I correct this problem?

    Thanks for the email, Stacy!
    I don't have an old PDF file that I converted to MicroSoft Word, however the new file that I am trying to convert and edit is the same kind of file that I've converted and edited before; An Invoice from the same Company. Is there a possibility that a download, MicroSoft Compatibility Pack for the 2007 Office System, onto MicroSoft Windows XP Home Edition Version 2002 computer might be causing the problem? Should I download to (.doc) or (.docx)? Any help will be greatly appreciated!
    Thanks,
    Joseph Renn Little
    Date: Fri, 21 Mar 2014 08:48:32 -0700
    From: [email protected]
    To: [email protected]
    Subject: I do not get a readable or editable PDF file that has been converted to Microsoft Word.
        Re: I do not get a readable or editable PDF file that has been converted to Microsoft Word.
        created by StacySison in Adobe ExportPDF - View the full discussion
    Hi Joseph,
    I'd like to assist!
    Have you tried converting one of your old PDF's that have worked in the past to see if it still works?
    Are these files scanned to PDF files?
    You may want to try utilizing the OCR solution.
    Let me know if that works.
    Looking forward to hearing back from you!
    Kind regards, Stacy
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/6231210#6231210
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/6231210#6231210
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/6231210#6231210. In the Actions box on the right, click the Stop Email Notifications link.
               Start a new discussion in Adobe ExportPDF at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • FCPX, How do I reconnect a video file that has been modified or over written?

    FCPX, How do I reconnect a video file that has been modified or over written?
    As an animator, I am constantly modifying and overwriting movies files that have already been imported into the Final Cut time line. In FCP7, I could easily modify and update movie files and have those changes appear in the timeline without the need to reimport and re-edit those clips, but FCPX seems to lose it's connection with any modified or overwritten file, making all the editing work I've done to these files worthless.
    Does anyone know of a way to reconnect to a modified or overwritten file? Because, this one single issue makes FCPX completely worthless to me.
    Andy Murdock

    If you import the new clip , select it and drag over the old offline clip , you can choose from the menu ...

  • Changing a number in an excel file that has been changed to a PD ?

    Changing a number in an excel file that has been changed to a PD ?

    Hi llkwx,
    If I understand correctly, you've converted an Excel file to PDF, but now need to edit the PDF file? If so, you'll need either update the Excel file and re-create the PDF, or use Acrobat to edit the text in the PDF. If you don't have Acrobat, you're welcome to try ti for free for 30 days: see http://www.adobe.com/products/acrobat.html for more information.
    Best,
    Sara

  • How do I open a pdf book cover file using Acrobat XI into Indesign CC?  Everytime I try, it says I am trying to open a file that has been saved wrong.

    How do I open a pdf book cover file using Acrobat XI into Indesign CC?  Everytime I try, it says I am trying to open a file that has been saved wrong.

    PDF files cannot be natively opened in InDesign. They can only be placed as graphics.

  • I can't figure out how to log off of my daughter's iTunes account that has been loaded to my PC.  When I want to sync my iPhone, I get her data, not mine.

    I can't figure out how to log off of my daughter's iTunes account that has been loaded to my PC.  When I want to sync my iPhone, I get her data, not mine.

    Hi, Abril_Perez17.
    This may be related to a new feature embedded in iOS7 that shows all purchased music by default.  Go to Settings > Music, then turn off Show All Music.  See if the issue ceases once the feature has been disabled.  This information is located on page 63 of the user guide below. 
    iPhone User Guide
    Regards,
    Jason H. 

  • Is there a way to read text messages from the past in a thread that has been ongoing for months?

    Is there a way to view/recover messages from months ago in a thread that has been ongoing? The messages are not deleted. If i just keep "loading new messages" a) it will take all day, I've tried, and b) it freezes on me.

    Try the computer apps PhoneView (Mac) or TouchCopy (Mac & PC):
    http://www.ecamm.com/mac/phoneview/
    http://www.wideanglesoftware.com/touchcopy/index.php
    Both will allow you to archive your text messages to your computer and read them easily.

Maybe you are looking for

  • Unable to execute an update statement using CallableStatement

    Hi there, I'm trying to run an update statement from JUnit using java.sql.CallableStatement and oracle.jbo.server.DBTransaction.         String updateSql =             "update footable set barcol=TO_DATE('12-SEP-09','dd-MM-yy') where bazcol = 505";  

  • I cannot get my mail. There is some problem with STPM

    I don't know how to set up the fields in MAIL!

  • Refuses to play tracks purchased/downloaded off itunes.

    My ipod mini sometimes refuses to play only the tracks purchased/downloaded from itunes. The only way to rectify the fault is to either re-sync or restore to factory settings, however sometimes once this is done, 24 hrs later it starts refusing to pl

  • Changes to objects in Unifier

    This was a question that came in from a Unifier user.  Since it is pretty common, I thought I would post it along with my response. We are wanting to approach our clients with Unifier however we have a number of them who change their business process

  • Die Excise duty Amortization Pricing procedure

    Hi, M faceing a problem in defining pricing procedure for Excise duty amortization for Die. The requirement is as follows: Sr.No.     Conditions     Result                                     Remark 1     Rate – Discount + Pakg & Forwarding     Basic