Monitor serialisation progress

Hi
is it possible to monitor progress of writeObject and readObject methods?
Also I need to determine size of object I am going to write: I was thinking about write my Object into ByteArrayOutputStream so that I can determine its size, but is there any way how to monitor serialisation process itself?
thanks a lot

It is possible to monitor any stream by writing a FilterInputStream or FilterOutputStream. See for example javax.swing.ProgressMonitorInputStream.
As Peter suggests, the performance of an individual readObject() or writeObject() method will be unmeasurable, unless you are writing enormous object graphs.

Similar Messages

  • Monitoring the progress of an HTTP File Request

    Hi,
    I've written a little applet used to sending Files to a PHP-Application. Everything works fine. Now I try to monitor the progress of the upload and I have a little problem. This are the main functions:
         public void addFile (String name, File file) throws IOException {
              this.bytesComplete = file.length();
              addFile(name, file.getPath(), new FileInputStream(file));
         public void addFile (String name, String filename, InputStream is) throws IOException {
              writeBoundary();
              writeName(name);
              write("; filename=\"");
              write(filename);
              write('"');
              newline();
              write("Content-Type: ");
              String type = connection.guessContentTypeFromName(filename);
              if (type == null)  {
                   type = "application/octet-stream";
              writeln(type);
              newline();
              pipe(is, os);
              newline();
         private void pipe(InputStream in, OutputStream out) throws IOException {
              this.bytesWritten = 0;
              byte[] buf = new byte[4096];
              int nread;
              int navailable;
              int total = 0;
              synchronized (in) {
                   while((nread = in.read(buf, 0, buf.length)) >= 0) {
                        out.write(buf, 0, nread);
                        out.flush();
                        total += nread;
                        this.bytesWritten += nread;
              out.flush();
              buf = null;
           }Somewhere else the function is called
         addFile ("file", filelist.get(i));Works fine, but now I've tried to monitor the actual progress by adding the following line between out.write and out.flush in the pipe-method
    int actualStatus = Math.round (this.bytesWritten / this.bytesComplete * 100);
    addProgress (actualStatus); // this method sets a JProgressBarAnd now something strange happens. It seems that all the data first is read so my progress goes to 100% in half a second and then is written later. I understand that os.flush only suggests (!) to write the data but not forces to do so.
    Is there a way to monitor the progress in real-time, so I can show a user how many data already is transferred? To do a real forced flush? Thanks for your help

    Maybe it's a bug: just found this: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5026745
    Does maybe anybody know a work-around?
    Edited by: thomwiesel on 23.03.2010 13:44
    Edited by: thomwiesel on 23.03.2010 13:45

  • How do you monitor backup progress

    How can you monitor the progress of a backup? I use timemachine and an external drive  to do my backups on my 09 Macbook pro. I want to be able to see the amount of files transferred and time remaining or any other pertinent info. Not just a spinning wheel.

    I don't know, I use bootable clones myself and it shows me the progress of the backup and updating of files.
    However I can point you to this guy who is the local TM guru
    All about Time Machine
    If you want to learn more about all sorts of backups to diversify your restore options (TM can fail to restore properly), including bootable clones etc. then read my UT here on the subject.
    Most commonly used backup methods explained
    I personally don't use TimeMachine, preferring the more advanced bootable clone options.

  • How to monitor the progress of an ORDER Number

    Hi,
    How can I Monitor the progress of an order from the EBS.
    Thanks
    Asis

    I assume you mean sales order.
    You can open the order header and go to tools > workflow status.
    It will show you when the order was entered , was booked and closed.
    You can also see details of all lines for the order.
    If you want to see status of a line, You can also go to line and go to tools > workflow status
    It will show you when it was entered, when booked, when it was progressed to next stages, and closed.
    Hope this helps,
    Sandeep Gandhi

  • Monitor streaming progress on client

    After thinking and taking in consideration suggestions on forum I decided not to use appv client gui on the machine.
    I have some debate about streaming time monitoring.
    Example O2013 takes about 15 minutes to finish streaming. Then when clicking Word icon the CHARGING bar appears.
    Personally. I don't see big inconvenience... I suggested to open Task manager after first login to machine added to OU with appropriate GPO and see processor activity. But at this time Windows also start to download Windows updates from the WSUS.
    I just got the answer to the question about placing a shortcut of the package elements on the desktop automatically from APPVMAN console...  This could be a real solution. The icon could be an indicator that streaming is started... and the app could
    be opened in 15 minutes.
    I guess it would right approach.
    What do you think?
    --- When you hit a wrong note its the next note that makes it good or bad. --- Miles Davis

    sorry, didn't mention what GPO I mean in my initial post. Sure it is APPV admx. And I publish Globally.
    See below a screenshot. I have only Publishing configured. No items in Streaming node touched.
    In my environment after adding the machine to AD, to the OU with APPV client configuration GPO applied, Office package is accessible about in 15 minutes. It is OK for a package of 2GB. Since we do not sequence Office package, it is configured for streaming
    and caching on local machine I guess.
    I just messed a bit with a term caching. After reading your post I believe I got it right. I thought that Streaming does placing the package on local machine and called it "copy". And when we first launch the app it will create some
    cache. I thought that the progress bar that runs some 15 seconds and appears just on first launch of Word creates the cache. My bad... Didn't read enough because have few projects at the same time.
    But my Appv system is clean and functioning well. Forum is a great help...
    In reality: the cache is fully streamed package. And in case of heavy APP like Office it not make sense to run the app from the network. So it is fully pushed into the machine's cache.
    I don't have autoload enabled but couple of small apps are loaded in cache without noticible delay from first start.
    Probably enable Autoload in  Streaming node will be a good idea.
    When package is fully cached what Charging bar means (what process is on background) during app's first start?
    Thanks for your time.
    --- When you hit a wrong note its the next note that makes it good or bad. --- Miles Davis

  • Batch Monitor - No Progress

    I've read on these boards that there are problems submitting batches in 10.5 with compressor 3.0.2 - which is what I'm running. My problem is slightly different...I am able to submit a batch and call up the batch monitor, where the job is listed as "processing" - but the progress bar never updates - and I've let it run on a short clip for WAY over the time that it should take and it never completes...I've already deleted compressor, trashed the prefs. and re-installed...any ideas or am I seriously just stuck until Apple gets their act together and fixes this?

    For the most part Apple doesn't monitor these discussions. Report the problem to the feedback page:
    http://www.apple.com/feedback/compressor.html

  • Progress Monitor OR Progress Bar.........Please help

    I have a JFrame with a menu. As soon as I click the menu I am adding a panel to the JFrame which takes some time. To indicate this to the user should I use the Progress Bar or the progress monitor.
    In either case how do I use it?
    Thanks in advance and it would be very useful if someone could give a small skeleton code.
    Thanks once again

    I am having the same problem which you had with the progress bar.
    I have a DesktopPane with Menu Bar on the top and Internal Frames get added to the DesktoopPane according to the Menu Item selected and the Internal frame takes time to open I want to show the progress bar. I thing you have got the solution by this time.
    Has anybody else have the solution for the above. Basically i want to show the time taken by the classes to load a Internal frame using Progress Bar. Please send me the piece of code. Thanks in Advance.

  • BB USAGE MONITOR -any progress?

    Hi everyone,
    I see that lots of customers are having trouble with BT saying they are going over their usage allowance when they don't think they are. I'm having similar problems and have been investigating it since BT started charging us £15 extra for our broadband. We are moderate to heavy users so have BB option 2 with the 40GB allowance. There are just 2 of us so we agreed to be mindful of this allowance and avoid things that push it up. So when we got the extra bills we were very surprised.
    1) We moved in September and until Christmas our speed was less than 1mbps some days so just browsing was difficult. Yet in November we supposedly used 72GB! In January we weren't here 2 weeks and I was ill one of them and didn't use the computer at all (just facebook on my 3G internet phone). Apparently we used 52 that month...?
    2) We torrent but only 3 files per week and then shut them down once finished because it eats up the bandwidth and makes surfing hard at peak times. We also don't "seed" for this reason. Also, ISPs throttle you if you torrent too much and we need the internet for our studies.
    3) We have BT vision so don't use iPlayer or the like on our PCs. Besides with our slow connection it's rubbish anyway!
    4) We don't stream music i.e. napster or spotify because it just doesn't work on our slow connection.
    5) We don't play MMOs or Xbox live.
    6) I installed BB monitoring software and studied the Home Hub stats and they show only a fraction of what BT are saying we use.
    7) If we are being hi-jacked/hacked it's not showing up on the HH.
    8) Other people are having this problem which makes me suspicious.
    So has anyone got anywhere with BT on this? I can't seem to speak to someone other than the Indian call centre. They refunded £9 so far but have charged me £45 for going over so far.
    I've sent another complaint email and I'll hope I don't just get told that I "don't accept" their bill again.

    Might to look here http://community.bt.com/t5/Other-BB-Queries/Broadband-usage-figures-crazy/td-p/149585/page/2
    extract
    KerryG wrote:
    Hi all,
    Just wanted to confirm that, as mentioned in some earlier posts, there has been an issue for a small number of customers whose usage was reported incorrectly in January and February.  We detected that their usage had been over-reported and found that there had been a problem with a piece of network hardware, which resulted in additional usage showing for these customers. 
    Since the problem was discovered we have identified the affected customers and made sure that no charges will be made for any of their February usage, and any charges that were made for January usage will also be refunded on their next bill.
    We’re really sorry that this happened, but want to reassure you all that this was the result of a specific set of circumstances.  We have already made changes to ensure this can't happen again, so you can be sure that all future usage will be reported accurately.
    Thx
    Kerry
    Check your exchange or major service outagesIf someone has given a helpful answer, please click on their Ratings star on the left-hand side. ***

  • Monitoring the progress of a delete operation

    Hello All ,
    I am deleting a table with 80M records based on rowid . But it appears that its running for so long .
    around 12 hrs . I can see an active session with delete statement . But no entry for that session id in v$long_ops .
    How can i find out the total percentage of completetion for session ? Please help me with the query
    Version Ora10gR2
    Thanks
    Aneesh

    Hi, if you're deleting much more than you keep i suggest you to:
    - create a "twin table"
    - insert the rows you want to to keep in the twin table
    - truncate the original table
    - re-insert the copied rows
    - commit
    - drop the copy table.
    The truncate table is much more faster than a delete the complete table (this is a DDL operation while the Delete is a DML operation)
    Sorry someoneElse i didn't see you last proposal (it's the same)
    Edited by: user11268895 on Jul 10, 2010 3:19 PM
    Another way to monitor this operation (if you are in PL/SQL) is to usethe dbms_Application_info package, here is an example:
    DECLARE
       i   NUMBER  := 0;
       f   BOOLEAN := FALSE;
    BEGIN
       WHILE NOT (f)
       LOOP
          DELETE FROM t1
                WHERE rwonum <= 20000;
          i := i + SQL%ROWCOUNT;
          DBMS_APPLICATION_INFO.set_client_info (   i
                                                 || ' record have been deleted...'
          COMMIT;
          IF SQL%ROWCOUNT < 20000
          THEN
             f := TRUE;
          END IF;
       END LOOP;
    END;then you'll be able to see how many rows were deleted at "any" time:
    SELECT client_info,v.*
      FROM SYS.v_$session vEdited by: user11268895 on Jul 10, 2010 3:20 PM

  • Monitoring the Progress of a BufferedImageOp

    I just spent a couple of minutes figuring out how to do this and thought I might
    share it with anyone who's interested.
    Feel free to comment on, criticise, or improve on my approach.
    java.awt.image.BufferedImage sourceImage = ...;
    java.awt.image.BufferedImage targetImage = ...;
    targetImage.getSource().addConsumer(new java.awt.image.ImageConsumer() {
       private int pixelsDrawn = 0;
       public void setPixels(...) {
          // Update the number of pixels drawn so far:
          pixelsDrawn += width * height;
          // TODO: Tell other objects (e.g. a JProgressBar) about the update.
    java.awt.image.BufferedImageOp imageOp = ...;
    imageOp.filter(sourceImage, targetImage);NOTES:
    There are two setPixels() methods.
    Though it is not clear in the Javadoc, I assume only one will ever be called for
    a particular image source. Both still need to be implemented, however, on the
    assumption that you don't know which one will be called for this source.
    The Consumer seems to be notified one row at a time (with ConvolveOp, at least).

    hi
    I tried a similar approach, but i must tell you:
    1. usually one line is scanned in each setPixel say line 1, then line 2.....
    But for many filters these scanning is repeated several times, i.e. after all the lines has been scanned, the scanning is one again, i.e. line 1 is scanned again followed by the others. and this process is repeated 2-5 times depending on the filter.
    So i don't think we can get the progress the filter that way.
    If anyone got any good way to find the progress of a filter, please do let me know. my mailid is [email protected]
    Tanveer

  • 1 I tried dowloading the free trial of indesign but it keeps stoping at 42 percent and won't budge. i have left it running for two days and there was still no progress. 2 I clicked on pin to notification in creative cloud so i could monitor the progress b

    need help

    If you had closed Creative Cloud application .
    Restart the computer once and check.
    If the Creative Cloud desktop app is launched ,
    Before starting installation of InDesign cc app.
    Clear temp folder.
    Please press Windows+R button together and you will get a run command window, please type-in %temp% and hit enter.
    Delete all contents present inside temp folder.
    You may skip the files which cannot be deleted.
    Then start the installation process for Indesign cc 2014.

  • Monitor sqlldr progress

    I know it is possible to query to get the time remaining and time elapsed for different sessions. Is something like this possible when running sqlldr?

    Not quite: sqlldr has no way of telling up front how much data is to be loaded; sql (rather: the optimizer) does know how many rows are changed/inserted. It does have quite decent feedback, though.

  • Progress Monitoring

    Hi all,
    I need to set up a ProgressMonitor so to display the progress on the main task of my program. this is pretty complex and goes beyond my program, involving others tools. How can i monitorate it? In the example which i saw, in the tutorial and in the Swing Book, i just saw how to make it goes with a Timer, but it's far from an application task progress..!
    How can i deal with this?
    thank you,
    regards
    marco

    1. Destroying the old dialog box"old dialog box".dispose();
    3. creating the JProgressbar and making it
    indeterminateBetter create JProgressBar object before starting the thread.
    2. Starting the long task
    4. Destroying the JProgressBar
    5. informing the user that the task is completeIn your class, define the SwingWorker as:
        final SwingWorker worker = new SwingWorker() {
            public Object construct() {
                /* start your long task.
                 * Call local method, method from other
                 * class, whatever.
                return new Object();
            public void finished() {
                /* To finish off the long task.
                 * This method is called when the thread
                 * finishes.
                 * This where you destroy your progress bar
                 * and inform user the task is completed.
        };Of course, you'll need another thread to monitor the progress of your task, and increment the value in progress bar.
    As for indeterminate progress bar, you'll need to know some estimate anyway.
    If at all possible to break the long task in blocks/sections, that number can be applied to the progress bar. Otherwise, get an average performance time, and set the maximum with a figure, and slowly increment the progress bar. If it reaches 99% before finish, then I guess you have to wait till the task ends, then display 100%. If finishes quickly, then you can boost the speed of increment (or instantly display 100%).
    Alternatively, if you can determine (dynamically) how long before the end of task while running your task, you can always update your JProgressBar values (you probably aware of this, anyway).
    Hope this helps.

  • Drop Box - possible for  other user to monitor progress?

    Is it possible, for the user whose Drop Box I am tranferring files to, to monitor the progress so they can tell when an upload is complete to their Mac?
    I get the progress window on my end, but they have no idea what is going on on their end.

    Pretty difficult, iirc the Filesize required is reserved at the start, so Get Info wouldn't help.
    Perhaps they could use Activity Monitor to observe the Network IN activity?
    Most likely someway to monitor it with a Script, but beyond me at the moment... Maybe Sharepoints with AFP Monitor!
    http://www.hornware.com/sharepoints/

  • Monitor progress of data donwload

    Hi,
    I would like to build something like a progress bar that
    monitors the progress of downloading of data from a remote
    database, or XML using HttpService. Is this possible? are there
    examples that can be shared?
    Thanks!

    <mx:ProgressBar indeterminate="true" visible="false"
    label="Loading, Please Wait..." enabled="true"
    labelPlacement="top" id="waitBar" textAlign="center"
    fontStyle="italic" fontWeight="bold"
    fontSize="10" color="#127A9C" themeColor="#4dda08"
    width="200" height="5" bottom="30" right="20"/>
    <mx:WebService id="" wsdl="{}" concurrency="multiple"
    load="waitBar.visible=true">
    </mx:WebService>

Maybe you are looking for

  • Error during R/3 IDES installation -

    Dear All I am trying to install SAP R/3 4.7E IDES on Windows 2003 Enterprise with Oracle 10.2.0.4 version. During the database load phase, i am encountering a problem during creation of D010LINF view which is using T0001 table and mentions that the t

  • M4a Tag editors what has the same features like Itunes i.e Compilation

    Hi all, Is there any software that you know about what will let me edit & change the id's of M4a files?, what it is I've just been into the loft a few days ago & found my old 40 gig usb drive what i used to use for dj'ing & found all my m4a tracks &

  • Can you carry Total Equipment Coverage (TEC) on an iphone?

    Yes or no? I have heard people claim both.

  • Jaggy Text after render in FCP

    OK So I bring in my nice text animation that I did in Motion 2 into FCP 5. I park on it and it looks nice and clean. Then after I render it in FCP it looks jaggy as if the field order is reversed. So I went back into motion and to render out a field

  • Two ISP connection and 4 NIC

    I have two ISP connections for Internet and the BM server has four interfaces, two public interfaces with completely different IP addresses and two private interfaces. I want to connect two different Terminal Server one for each ISP connection. When