Do I need check for "broken packets" ?

Hi all,
I'm writing an application that uses sockets in java (j2me CDC Profile) that communicates with a server that was written in Delphi.
This Delphi application has a loop for receiving packets and checks if all amount of data received reached the final packet size.
I believe that all that I need to do is something like this:
while((charRead = bufReader.read()) > -1){
          strBuffer.append((char)charRead );
}I suppose that if there is some "interruption" in communication with sockets,
bufReader.read() will return -1 and I don't have to worry if server sent me packets with different sizes...
And btw, If someone with experience with sockets can explain or show me some path to learn more about sockets concepts to eliminate my doubts about it. What differences can I found in cases like this, I mean, differences between java and other languages when we talk about sockets.
I hope I could be clear in my explanation.
Thanks for any help.

If your communication is done using TCP/IP there is no need to check for corrupted packets. You will get either all the data that was sent or an exception will be thrown. The data may come in several packets, but if you just read until you reach the end of file or a delimiter such as linefeed, you should be fine. If you wrap your InputStream in a BufferedReader you can read lines and the bytes will be converted to Strings for you.

Similar Messages

  • How to check for broken links on my remote site?

    How can I check for broken links on my _remote_ site using DW10 (i.e. DWCS4)?
    I know of the Link Checker tab so as to check the local site.
    I've been using the app Integrity to do this, but it would be convenient to be able to also do this in DW.
    Running OS X 10.8.2.
    Thanks for any advice.
    Ron

    Over the years I've had both happen.
    I'm not saying this happens often... it doesn't... but it does happen.
    And this is with my site links working fine locally.
    So it is either happening on upload or on the servers.
    I can't tell you the number of times I've asked webhosts (I've had many) why a site is not working at all... and they have told me that they are either doing work on their servers or that they're 'upgrading' and moving my sites to another server. So perhaps this is part of the problem.
    Again... rarely happens but it does happen.

  • Using Reference Mode and checking for broken alias links

    I use iPhoto 09 in reference mode (where it doesn't import the pictures into the library). I'm aware of the pitfalls of doing this but, long story-short, it's better for my needs this way. I just wanted to know if there's a way to tell iPhoto to check for missing photos or broken alias links. It seems to just pop-up randomly some time after moving or deleting anything and I'd rather take care of business when it's convenient for me not for iPhoto. I don't move my pictures very often but when I do I want to be able to re-link them immediately and not wait for iPhoto to randomly ask me and then I don't know what album or date the picture is from that its asking me about. Thanks in advance!

    I thought you were aware of the pitfalls of running a Referenced Library One of which is that if you move the files iPhoto will lose track of them.
    Unfortunately, iPhoto has no mechanism for checking the integrity of the links - another reason I would not use iPhoto in Referenced Mode.
    You could try use an app like [FileBuddy|http://www.skytag.com> to check and repair broken aliases. However, if you continue to manage your files without reference to iPhoto then you will continue to have problems.
    Regards
    TD

  • Checking for Broken Links

    Is there a solution out there for checking broken links in a content area in Oracle Portal?

    I think a third party products will check broken links by identifying links which return a 404 error.
    Portal (at least 3.0.6.6.5) does not respond with 404 but gives WWC-46000. I doubt a third-party product will recognise this as a broken link.
    Analyzing apaches log files is of no use either. The error log gives no entries, the access log shows apache has responded the request with HTTP-200 , which is correct if you see the problem from Apache. Apache does a request to modplsql, a page is returned, and Apache passes it on.
    The problem becomes somewhat more complicated if you consider access rights to folders. A link can be OK for userA, but can be broken for userB.
    Ton

  • Aye have bought an old iphone 8gb phone its not a 3g one and aye can't download any apps because it needs to upgrade to ios4.3 how do aye upgrade my iphone? I have tried checking for updates but it keeps saying its up to date

    Aye need to update my old iphone 8gb its not a 3g phone its the older one to ios4.3 and it won't let me update so aye can't download any apps and aye have tried checking for updates and it says that my iphone is up to date can anyone help?

    To identify your iPhone see:
    http://support.apple.com/kb/HT3939

  • I currently have iTunes version 7 and I need to upgrade to version 10.  I am afraid of losing all my music if I just download 10 and when I use the "Check for updates" in the version 7 help menu, it tells me the server cannot be contacted.

    I currently have iTunes version 7 on my computer and need to upgrade to version 10 to sync my new nano iPod.  When I tried the "check for updates" under the version 7 "help" menu, it said it could not contact the update server.  I am afraid if I just download version 10 from the website, it will wipe out my music library.  What should I do to upgrade?

    Back up your music and install from the website. You probably won't need to do this, but if your library is erased, restore it from the backup.
    (59049)

  • When I try to update my phone to ios 7 it says i need to update my itunes to 11.0.5, when i check my current version in help menu under check for updates it says I have the current 11.0.5 version.

    When I try to update my phone to ios 7 it says i need to update my itunes to 11.0.5, when i check my current version in help menu under check for updates it says I have the current 11.0.5 version. Even the downloader for the update doesnt show that i need to update.Help plzz????

    There is some kind of error. The new version of iTunes is 11.1, which although is not available via updates, it can be downloaded from the Apple website here:
    http://www.apple.com/itunes/download/
    After updating iTunes to the newest version you should be able to update your iOS
    EDIT: I just did that and it works

  • I have installed itunes 10.7 several times.  All goes well.  After reboot, I go into itunes and check for updates and it says I need to download the update 10.7! (And so cant sync with my Iphone)

    I have installed itunes 10.7 several times, all goes well. After reeboot, I go to check for updates and it still wants to update to version 10.7! I cant sync to my iphone4 because I get an error message saying I need version 10.6.3 or later. Help

    Thank you for getting me started on the track by mentioning "Revo" Uninstaller.  The results of "Revo" spoke volumns on why a successful install of ITunes is so difficult to achieve.  It is the evil "BONJOUR".
    I then tripped upon the following site by Apple and the detailed directions (I read, printed, re-read and followed the instructions.  It was intense) brought a successful ITunes, Quick Time and the lovely Bonjour home.  Thank you for the start JD42.
    http://support.apple.com/kb/HT1923

  • I have a box that will not go away, it says,  "To open JavaApplication, you need to install a Java SE 6 runtime.  Would you like to check for and install one?  If i push not now, it keeps popping up, if I push install, it says it's not available, help.

    I have a dialogue box that will not go away and it seems to have started when I upgraded to Mt. Lion.  the box says, "To open JavaApplication, you need to install a Java 6 SE runtime.  Would you like to check for and install one?  (smaller print)  Note: Usw of this software is subject to the Software License Agreement applicable to the software you are downloading.  A list of Apple SLAs may be found here: htp://www.apple.com/legal/sla/
    Finally there are two boxes to click.  One says not now.  If I click on that the box goes away for 2 to 3 seconds and then pops back up and WILL NOT go away.  If I click on the second box, Install, it says  The software is currently unavailable.  To install a Java SE 6 runtime later, open Java Application again.
    My confusion here is that I have no idea what the java application is, When I click "okay" on that box, the original box pops us again and WILL NOT go away. CGoing to the apple lega web site was no help.  My solution so far has been to drag the dialogue box as far to the lower right and out of the way as far as I can.  Help.

    Does this happen immediately after you log in? If so, one of your login items is probably causing it.

  • I cannot update iTunes. In instructions for updating it says to go to help and then click check for updates. Guess what! No help options within iTunes. I need to be able to syn my iPod touch 5 but I cant without the newest iTunes. I am sick of this crap.

    I am EXTREMELY tired of having to deal with this. iTunes has been an issue since I got it and unfortunately whenever I want to update my computer's iTunes account it demands I download a new format (which has continually gotten worse and WORSE over time). I wish things would not be updated so frequently. As soon as I have the new format working decently (ONLY decently, I have never had an apple product that has worked as it is stated it should) another update comes along. And THIS time, I cannot download it. First problem: I open iTunes. It says I need to update for my ipod to work. I think "great. I click ok and it will do it automatically!" Oh boy was I wrong. I don't do anything. I search up how to update things. It says ON THIS SITE: Go to help in the itunes store. THERE. IS. NO. CLEARLY. VISIBLE. HELP. SECTION. I have looked for FAR to long for this to be worth my time.

    Okay - let's cut to the chase...
    If the Menu Bar (File, Edit... Help) shown in my screenshot below is not visible, use CTRL+B to display it. Then click on Help/Check for Updates. If one is available, you will be able to select it at this time.
    Note the item at the bottom of the list; About iTunes. Selecting that will show you which version of iTunes you are using.
    An alternative method to display the Menu Bar is click on the box in the top left of your iTunes window...

  • What is the Firefox start page looking for when it tells me I'm not using the most current version and need to update Firefox? The check for updates button says my version is up to date, but the start page disagrees. Is there a setting I need to adjust?

    Okay: My start page is the one Google provides: http://www.google.ca/firefox?client=firefox-a&rls=org.mozilla:en-US:official and frequently it has a note underneath the search box that "You're not on the latest version of Firefox. Upgrade today to get the best of the Web!" But when I check for updates on the About Firefox window, it says my Firefox is up to date. So what is the start page looking for? Is there some setting I need to adjust? Or is this a Google marketing ploy to get me to switch to Chrome?

    I tentatively think I have the solution; this is for when the session id value 'thing', in about:config, referred to in other answers is already on the default/rest state.
    I am assuming, I don't what to imply certainty in-case there is a value wrong in our browsers, that the problem stems from the fact that our homepage is no longer the default for Firefox.
    So, go to 'Options'>'General' and delete the homepage. This will reset it to the new address, which is 'about:home'.
    I hope this helps some people.

  • Duplicate BP Reference Numbers for same document type -need check on orders

    Version: (2007A)
    Description of requirements:
    The user is allowed to create two sales orders for the same customer that have exactly the same BP Reference. When the user invoices one of them and then tries to invoice another, they are  warned that there is already a document of the same type with this reference number. The problem is, they ship the goods out physically before they actually create the invoice document, so that by the time they are entering the invoice in the system, the goods have already been shipped twice, when they should only have been shipped once, If they were warned when they were adding or updating the order, then this could be prevented from happening. Same thing for vendors. Our customers would like to have the check for duplicate BP references on the purchase order as well as on the AP Invoices.
    Business needs: Our Clientsu2019 customers are receiving duplicate shipments and this has a negative impact on their business relationship as it creates costly extra work and inconvenience for all.
    Examples: Would like the same check that is currently on AR and AP Invoices for the same BP reference number existing already on the same document type implemented on the sales order and purchase order. When the user is adding an invoice for a BP and there is already an invoice for the BP with the same BP reference number, the user is warned and asked if they want to continue.
    Current Workaround: None. As our customers often physically ship the goods before creating an invoice from the order, there are duplicate shipments and this is most inconvenient and costly to our customers as well as their customers.
    Proposed solution: see above. This is a high priority item for our customers.
    Sally Weinrauch,
    Senior Support Analyst
    Coastal Range Systems Inc.
    Recipients of: SAP's Partner of the Year 2007 & 2005,
    North America's Top Ten 2008, 2007 & 2006.
    200 - 6400 Roberts Street, Burnaby, BC, V5G 4C9

    hi,
    Use SP_TransactionNotification to block sales order & purchase order from adding having duplicate bp reference number.
    SAP Note 1258097 - Can the Suppliers Reference number be
    made unique? activated approval procedure also for ar invoice.
    It may solve problem.
    Jeyakanthan

  • How do I check for bad sectors on the hard drive? (Need help soon!)

    I've asked this in a different thread but am not getting exactly the question answered completely. I need to run a check on my drive that will test each sector and if a bad sector is found, it will block that sector from being written to with data in the future.
    I used to use Disk First Aid or Apple HD Setup or Norton Utilities to do this. Norton does not appear to be made for Mac OSX 10.4.4 and those other utilities appear to be System 9 and earlier utilities only.
    Is there some way of doing this with current Apple tools? My original post is at http://discussions.apple.com/thread.jspa?messageID=1592160#1592160
    Thank you. I've been down since Saturday and really need to get an answer so I can move forward and get my computer back up and running.

    There is only one way to do this. Make a bootable backup of your drive to an external Firewire drive (you can use the Restore option of Disk Utility.) Then do the following:
    1 Boot from your Tiger DVD. After the installer loads select Disk Utility from the Utilities.
    2. After DU loads select your hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Click on the Partition tab in the DU main window.
    3. Set the number of partitions from the dropdown menu (use 1 partition unless you wish to make more.) Set the format type to Mac OS Extended (Journaled, if supported.) Click on the Partition button and wait until the volume(s) mount on the Desktop.
    4. Select the volume you just created (this is the sub-entry under the drive entry) from the left side list. Click on the Erase tab in the DU main window.
    5. Set the format type to Mac OS Extended (Journaled, if supported.) Click on the Options button, check the button for Zero Data and click on OK to return to the Erase window.
    6. Click on the Erase button. The format process will take 30 minutes to an hour or more depending upon the drive size.
    By reformatting using the Zero Data option DU will force checking for bad blocks.
    If you wish to forego the above procedure you can purchase TechTool Pro (v. 4.1.1) which has a module for scanning the disk for bad blocks. However, repairing the drive can only be done by reformatting.

  • I need help! "Unable to check for purchases" for over a month!!!

    I have been getting the same error message for over a month! Every time I try to check for purchases from the iTunes Store, I get a message saying: "Unable to check for purchases. The network connection timed out." I have 269 items waiting to be downloaded. I am SUPER frustrated, I contacted iTunes customer service twice now, the first time with no response and the second time the response I received didn't help any, I followed up to their answer, again with no response!! I really would like to download these items (most of which I paid for; some were free downloads...). I think this may have happened to me before when my computer crashed and I need to redownload everything from iTunes. I think there is just too many items to download all at once, but they won't even come up in my iTunes, so that I can download them a smaller number at a time! I also had a hard drive failure on my laptop about a week and a half ago (after this problem had already been occuring), and I'm pretty sure any of the items pending downloading that had already begun downloading and was stopped suddenly (a few; maybe a third of what is awaiting downloading...), those items' temporary files were deleted. Could this be causing a problem as well? I've read maybe trying to check for purchases at a less busy time of the day, really early in the morning, or really late at night...Will this work?? I've tried nearly 100 times repeatedly from 8-close to midnight since this has been occuring. I just want the items I paid for. I have been waiting for far too long. I've tried everything suggested and I don't know what else to do!!

    First off, make sure Norton isn't blocking iTS access
    Here are Norton directions
    http://service1.symantec.com/SUPPORT/nip.nsf/0/7fb6e478e2a1abf78825708b00558625? OpenDocument&seg=hm&lg=en&ct=us
    Secondly, you're the third or 4th person to post here that having hundreds of downloads cuases problems.
    Contact iTS again, using the email they already sent. Don't start a new ticket.
    Give them the URL of this topic, and ask them to reduce the number of items in your download queue. The magic number mentioned in the other thread was 69 downloads didn't cause a problem. (Apparently, 70 does)
    Message was edited by: Katrina S.

  • HT201232 My operating system is Mac OS X 10.6.8 and when I'm surfing the web, it tells me I need to update my browser however when I check for updates, nothing comes up. What do I need to do to get Mac OS X Lion v10.7?

    My operating system is Mac OS X 10.6.8 and when I'm surfing the web, it tells me I need to update my browser however when I check for updates, nothing comes up. What do I need to do to get Mac OS X Lion v10.7?

    Software update will only bring you up to the current level of the system you are using - you are at the maximum for Snow Leopard. To get Lion or higher you will have to go to the Mac App Store in Applications and purchase it there (Yosemite is free). You will need to check that your Mac meets the requirements and you should particularly note that PPC programs such as AppleWorks will not run in Lion or above.
    The requirements for Lion are:
    Mac computer with an Intel Core 2 Duo, Core i3, Core i5, Core i7, or Xeon processor
    2GB of memory
    OS X v10.6.6 or later (v10.6.8 recommended)
    7GB of available space
    Lion is available in the Online Apple Store ($19.99). Mountain Lion (10.8.x) is also available there at the same price (though it's reported to have been removed from sale in some countries so may well cease to be available generally) but there seems little point as the system requirements are the same for Yosemite (10.10.x) - which is free - unless you need to run specific software which will run on Mountain Lion only.
    The requirements for Mountain Lion and Yosemite are:
    OS X v10.6.8 or later
    2GB of memory
    8GB of available space
      and the supported models are:
    iMac (Mid 2007 or newer)
    MacBook (Late 2008 Aluminum, or Early 2009 or newer)
    MacBook Pro (Mid/Late 2007 or newer)
    Xserve (Early 2009)
    MacBook Air (Late 2008 or newer)
    Mac mini (Early 2009 or newer)
    Mac Pro (Early 2008 or newer)
    Yosemite is available from the Mac App Store (in Applications). Mountain Lion can be obtained the Online Apple Store. (Mavericks is no longer available.)
    If the problem is only with Safari and you are otherwise happy with Snow Leopard you could switch to FireFox (free) - the latest version of that will run in Snow Leopard.

Maybe you are looking for