HttpInputStream works strange..!!!

My program is reading HTML using HttpURLconnection. The inputstream read from HttpURLConnection is converted to a string. The code looks like the following.!!
static private String inputStreamToString (InputStream is){
''''StringBuffer sb = new StringBuffer();
''''int d=-1;
''''try{
''''''''d=is.read();
''''''''while(d != -1){
''''''''''''sb.append(String.valueOf((char)d));
''''''''''''d = is.read(); <----------------- stuck here
''''}catch(IOException e){
''''''''e.printStackTrace();
''''return sb.toString();
But the problem is after reading several pages suddenly the java program doesn't do anything, it doesn't consume any CPU time( means no infinite loop ). It looks like the process is sleeping.
Does anybody know what is going on???
thank you

Use public int available() before calling read() to ensure that there is data in the stream. Otherwise read() blocks until new data is received.

Similar Messages

  • Simple TweenEvent works strange?

    Hi there,
    I have a simple example of some tweening action.
    There are some strange things that happen that would not
    happen before in AS 2.0
    If you press the button some times (fast) then suddenly the
    squares will freeze at a certain moment.
    It could be a bug, but maybe i am doing something wrong?
    Also i tried to make an eventListener, so when tween is
    finished, then fire a function. That works, but only
    for one movie!
    Isn't there a way to make a multiple tween Listener like
    this?
    this["myTweenAlpha"+i].addEventListener(TweenEvent.MOTION_FINISH,
    removeSquares);
    This way the movieclips will remove or change not at once,
    but one by one.
    To test this example you have to place a button on your stage
    and call the instance name: button_btn
    And create a small square and convert it to a movieclip. Then
    delete it from the stage And go to your
    Library and call it's linkageId =" square"
    See, the attached Code.
    I hope someone has a solution, because i already spend more
    then 4 hours to figure it out.

    Thanks for that tip, i tried to implement this, but with an
    aditional timer funciton it still
    works strange. When you press the button, the squares will
    now build after 50 miliseconds.
    It all works fine. But when you press multiple times on the
    button (very fast) ..it still freezes the squares
    at a certain moment.
    I also tried to make the timer event unique, using a counter.
    At some forum in our country i read about
    that the classes Adobe released (tweens) are very buggy. And
    that they recommend to use another
    class (like
    caurina).
    But perhaps there is a fix for these strange behaviour when
    using the Adobe tween class?
    i updated the attached script (14:32). I discoverd the
    eventListener from the timer must be reset, that's why
    i used a boolean. It's more stable now, but still if you
    press long enough and fast it will freeze at some moment.

  • Ac adaptor not detecting, keyboard working strange

    Hi all,
    I need your help. I bought Hp pavilion g6 g6 - 2231TX . Serial no : [Personal Information Removed]
    Product no : C9L68PA#ACJ.
    Approximately 1.5 years back I bought with windows 8 pre installed. Now I facing sudden problem. Charger not get detecting. Keyboard working strange and some keys not at all working. And my laptop not able to charge .it's fully discharged. I need ur help to recover from this problem.

    Hi Bharthi,
    Thank you for visiting the HP Support Forums and Welcome. I have read your thread on your HP Pavilion g6-2231tx Notebook and getting multiple errors. Try performing a hard reset. When performing a hard reset please note remove any and all USB devices, and remove memory cards from the card reader slot. Disconnect all non-essential devices. If that does not help try to turn on the computer you start to press F11 repeatedly till the menu opens. You can do a system restore. System restore could be returned back in time to when no errors occurred. You also have the ability to perform a refresh on the system. Please read the document entirely before starting and make sure you back up all documents and files.
    Here is a link to the HP Support Assistant. This will update any drivers or software that is needed.
    Hope this is helpful.
    Thanks.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the bottom to say “Thanks” for helping!

  • JDialog works strange.

    Thank you for interesting this thread.
    I found JDialog works strange in the code below.
    child1 appears strangely.
    It might be a bug ??
    or any way to avoid this ?
    I'm using...
    Windows' 64bit.
    JDK 1.6.0_24 64bit.
    import java.awt.Dialog.ModalityType;
    import javax.swing.JDialog;
    import javax.swing.SwingUtilities;
    public class Test {
         public static void main(String[] args) {
              SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        JDialog root = new JDialog();
                        root.setBounds(0, 0, 100, 100);
                        root.setVisible(true);
                        JDialog child1 = new JDialog(root);
                        child1.setSize(200, 200);
                        child1.setLocationRelativeTo(null);
                        child1.setVisible(true);                    
                        JDialog child2 = new JDialog(child1);
                        child2.setModalityType(ModalityType.DOCUMENT_MODAL);
                        child2.getContentPane().setBackground(Color.RED);
                        child2.setUndecorated(true);
                        child2.setSize(100, 100);
                        child2.setLocationRelativeTo(null);
                        child2.setVisible(true);
    }Edited by: user7028083 on 2011/06/15 4:29
    Edited by: Darryl Burke -- fixed the code tags

    Thank you for your explain !!
    I always want to be able to create better English sentence like you.
    well, I create a class, which is named MySwingWoker and is extend SwingWorker.
    And I want to show loading message while the background job is running with MySwingWorker class.
    Why loading message is setUndecorated(true) is I think it looks better.
    (Actually, it's not important for anything, but my sense of accomplishment.)
    While testing, I found that dialog is appearing strangely some cases.
    So I started to search what is wrong, as other programmer do.
    While searching, I created the example I wrote above,
    and found that if I remove "child2.setUndecorated(null)" or "child1.setLocationRelativeTo(null)", it works normally.
    I wondered this is a bug or spesification or something else.
    I don't know if asking here is right way, or not.
    But I thought someone, knows Java very well, would give me a advice.
    thanks.

  • 2nd display/monitor not working (strange problem)

    hello,
    I have a mac pro with this specification...
    Model Name:          Mac Pro
      Model Identifier:          MacPro1,1
      Processor Name:          Dual-Core Intel Xeon
      Processor Speed:          2.66 GHz
      Number Of Processors:          2
      Total Number Of Cores:          4
      L2 Cache (per processor):          4 MB
      Memory:          2 GB
      Bus Speed:          1.33 GHz
      Boot ROM Version:          MP11.005C.B08
      SMC Version (system):          1.7f10
      Serial Number (system):          Y***Q2
      Hardware UUID:          00000000-0000-1000-8000-0017F207E704
    Display monitor Specs :
      Chipset Model:          NVIDIA GeForce 7300 GT
      Type:          GPU
      Bus:          PCIe
      Slot:          Slot-1
      PCIe Lane Width:          x16
      VRAM (Total):          256 MB
      Vendor:          NVIDIA (0x10de)
      Device ID:          0x0393
      Revision ID:          0x00a1
      ROM Revision:          3008
      Displays:
    Cinema:
      Resolution:          1680 x 1050
      Pixel Depth:          32-Bit Color (ARGB8888)
      Mirror:          Off
      Online:          Yes
      Rotation:          Supported
    Cinema HD:
      Resolution:          1920 x 1200
      Pixel Depth:          32-Bit Color (ARGB8888)
      Main Display:          Yes
      Mirror:          Off
      Online:          Yes
      Rotation:          Supported
    Problems facing....
    My cinema HD is set to primary display and Cinema as 2nd display. Everything was working fine but suddenly my 2nd display stopped working. It remains black as if its in sleep mood. The small power led light on the monitor is On(not blinking). In Graphics/Displays shows both monitors are connected. I can drag any window to the 2nd display as if its working but its still black. In display preferences it shows both monitor on arrangement section. I can even change the resolution size of both monitors.
    My cinema display monitor has no problem. I have checked it already. I have swapped the DVI ports at the back of my cpu but it seems only the 2nd port is giving this problem. As if no matter what my 2nd port of graphics card is on sleep mood. I have taken it to our local apple center and both ports were working fine there, the only difference is they checked it using none apple lcd monitor. But when I brought it back to office, it had the same problem again. The strange thing is....one day while I was working the 2nd display suddenly appeared but when I restarted my mac, it went back to the same problem. Till now my 2nd display not showing anymore. I have reinstalled to new OSx but the problem remains. So can anyone pls tell me how I can solve this problem.
    thanks
    <Edited by Host>

    only the 2nd port is giving this problem
    You have an older card, and the second port is flaky. The problem follows the port.
    I am sorry to be so blunt, but the problem is YOU.
    No one wants to be the one to club you on the head and point out that your card is dying, and you are going to have to get a new(er) one. There is no "quick fix" for dying Hardware, and no fix at all for you when you will not connect the dots and realize your card is on its last legs.
    If running 10.6.4 or later, you can install the 5770 and it will work, but not at quite the advertised speeds if your slot will only go up to 8x.

  • Procedure / Funtion works strangely at times

    Hi All,
    I am using
    Forms [32 Bit] Version 6.0.8.23.2 (Production)
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Oracle Toolkit Version 6.0.8.23.0 (Production)
    PL/SQL Version 8.0.6.3.0 (Production)
    Oracle Procedure Builder V6.0.8.20.0 Build #1377 - Production
    PL/SQL Editor (c) WinMain Software (www.winmain.com), v1.0 (Production)
    Oracle Query Builder 6.0.7.1.0 - Production
    Oracle Virtual Graphics System Version 6.0.5.38.0 (Production)
    Oracle Tools GUI Utilities Version 6.0.8.20.1 (Production)
    Oracle Multimedia Version 6.0.8.20.0 (Production)
    Oracle Tools Integration Version 6.0.8.18.0 (Production)
    Oracle Tools Common Area Version 6.0.8.18.0
    Oracle CORE Version 4.0.6.0.0 - Production
    I am facing a problem with the execution of Procedure / Function since long.
    For example the following function returns Null value sometimes:
    FUNCTION GET_LUD_KEY (P_LSE_NUM NUMBER) RETURN NUMBER IS
         CURSOR SEL_LUD_NUM IS
              SELECT NVL (MAX (LUD_NUM), 0) + 1
              FROM RE_LEASE_UNIT_DTLS
              WHERE LUD_LSE_NUM = P_LSE_NUM
              AND LUD_COM_NUM = :COMM.COMPANY;
         V_KEY     NUMBER;
    BEGIN
         OPEN SEL_LUD_NUM;
         FETCH SEL_LUD_NUM INTO V_KEY;
         CLOSE SEL_LUd_NUM;
         RETURN V_KEY;
    END;
    and then if i will change the funtion as follows and just add a Pause it works and then if I remove the pause then also it works.
    FUNCTION GET_LUD_KEY (P_LSE_NUM NUMBER) RETURN NUMBER IS
         CURSOR SEL_LUD_NUM IS
              SELECT NVL (MAX (LUD_NUM), 0) + 1
              FROM RE_LEASE_UNIT_DTLS
              WHERE LUD_LSE_NUM = P_LSE_NUM
              AND LUD_COM_NUM = :COMM.COMPANY;
         V_KEY     NUMBER;
    BEGIN
         OPEN SEL_LUD_NUM;
         FETCH SEL_LUD_NUM INTO V_KEY;
         CLOSE SEL_LUd_NUM;
    pause;
         RETURN V_KEY;
    END;
    I am having trouble with such a problem since long. Hopefully I am waiting for the solution for it is it because of any forms developer bug or I need any patch for it. Was this problem faced by any one else.
    Thanks and Best Regards
    Arif Khadas

    Dear Baig thanks for your quick response once again.
    The company item which belongs in every form and it belongs to a non database block called comm.
    The value for the company item is assigned in the pre form trigger and its working quite well.
    This are the company standards and its working quite well for each and every form in dozens of Modules.
    The problem is not with :comm.company for sure.
    The problem I am facing is the function works fine then sometimes in between it stops working then i just add a pause then it starts working again and then once again when i remove it works.
    Its as if the this procedure does not gets executed at all sometimes. I would like to know the reason for such strange behaviour.

  • X-Fi Xtreme Gamer wont work - strange noises

    Hello!
    I just bought my new soundcard today - disabled the onboard sound
    clean uninstalled the drivers with drivercleaner and installed the drivers from the attached cd.
    After rebooting strange noises appeared instead of normal sound
    - no normal usage is possible
    I tried several solutions, installed the web update 4, switched pci slots but the problem is still there...
    Hopefully someone will be able to help me because i'm getting really mad...
    Here my system specs :
    AMD Athlon 64 X2 5000+ 65nm Brisbane core
    DFI Infinity NF UltraII-M2 @ present bios & 6.86 whql chipset drivers
    2x 024 MB DDR2 Corsair TWIN2X2048-5400C4
    Leadtek Geforce 7950 GX2 @ Forceware 94.24
    Windows XP Professional with SP 2 up-to-date
    Tevion analog 5. Soundsystem
    Cooltek Real Plug Power 500W
    The system is completly @ default - non overclocked !
    Thanks in advance !
    RBMessage Edited by RunenBlut on 07-07-200709:32 AM
    Message Edited by RunenBlut on 07-07-200709:34 AM
    Message Edited by RunenBlut on 07-07-200709:37 AM
    Message Edited by RunenBlut on 07-07-2007:29 PM

    the strange point is that i turned on my pc yesterday morning - everything was the same - than i hit 3 times the reset to default button (i did not change anything from the beginning) and after the 3rd time everything worked fine...
    hopefully this will continue as its now
    thx for your reply anyway.

  • Condotion working strange

    Hello
    I noticed strange way of working of the condition in my query. I built the report which contains two characteristics in lines (shop, article) and three columns (value 1, value 2, difference). I built the condition like "difference <> 0" do present only the combinations to be explained. The matter is that it works perfectly, but not in case, when the summary of differences is 0. For example, when I have two lines with differences, one is "2" and second is "-2", the report presents no lines. For another selection, I can have for example three differences, like "1", "2", "-4" - in this case report will give me those three lines as a result.
    Any idea?
    Arelis

    Hi Arelis,
    Please check in your query designer if "supress Zero" is active for Rows and column. If yes select "Do Not Supress" You will find this option in Query Properties -> Rows/Column.
    Regards,
    kams

  • Illustrator CC tools working strangely on Cintiq 24HD on OsX Yosemite.

    Hello everyone. A couple of weeks ago I got a Cintiq 24HD to replace a previous one. I mostly use the tablets to work with PS but do some illustrator work with them too. So far I've used 3 different tablets with this same 27" iMac, a 21Ux, a 22HD (for only a day) and this 24HD one.
    Ever since I switched to the 24HD, I haven't been able to use Illustrator due to a strange bug that messes up with every tool.
    It seems like the tools "snap" to a point outside the area of the 24HD, to the far left of the screen, "pulling" everything I try to do towards that point, be it a selection or a figure or whatever I try.
    Im attaching a picture to better illustrate this. In this picture my mouse pointer was located on the upper right corner of the long rectangle you see there. I was actually trying to pull the square tool to the right to create a perfect square, and that is what happens.
    This only happens with illustrator. Photoshop works perfectly.
    Anyone else having or experienced this sort of issue? Any ideas on how to fix it?
    Thanks a bunch, all help is most welcomed.
    George.

    IIRC this issue has been brought up couple of weeks ago. Seems to be some issue with Yosemite (maybe only 10.10.2). There's not much you can do about it, but you might try and search for it in the forum.

  • Illustrator CC tools working strangely using Cintiq 24HD on OsX Yosemite.

    Hello everyone. A couple of weeks ago I got a Cintiq 24HD to replace a previous one. I mostly use the tablets to work with PS but do some illustrator work with them too. So far I've used 3 different tablets with this same 27" iMac, a 21Ux, a 22HD (for only a day) and this 24HD one.
    Ever since I switched to the 24HD, I haven't been able to use Illustrator due to a strange bug that messes up with every tool.
    It seems like the tools "snap" to a point outside the area of the 24HD, to the far left of the screen, "pulling" everything I try to do towards that point, be it a selection or a figure or whatever I try.
    Im attaching a picture to better illustrate this. In this picture my mouse pointer was located on the upper right corner of the long rectangle you see there. I was actually trying to pull the square tool to the right to create a perfect square, and that is what happens.
    This only happens with illustrator. Photoshop works perfectly.
    Apparently, this is one more issue related to this Yosemite thing.
    Anyone else having or experienced this sort of issue? Any ideas on how to fix it?
    Thanks a bunch, all help is most welcomed.
    George.

    IIRC this issue has been brought up couple of weeks ago. Seems to be some issue with Yosemite (maybe only 10.10.2). There's not much you can do about it, but you might try and search for it in the forum.

  • Ethernet not working, strange problem

    Hi Everyone,
    I have a very strange problem. I haven't had internet at my new apartment all summer and have been using my schools internet to use the internet. I typically would go to the computer lab and use the ethernet cable to plug in and it worked fine. However the other day i went to a different room and connected there and that worked fine, but now if i go back to the computer lab it says my IP is being used by another device.
    Stranger further, now that i got internet at my place my computer won't even read it, it says its connected but can't get online, while my suitemate has no problem what so ever. Any hints as to what might be going on?
    The thing is if i go back to that classroom and plug in it works but anywhere else my ethernet connection does not work.
    I have a MacBook Pro, bought last summer running Lion.
    Jacob

    I am having the same issue, Jacob.  In late August, I was working on a wired network at a hotel during business travel.  One day, I was fine.  The next morning, I received the same information...that my IP address was being used by another computer.  My business partner logged in to the network from his Linux machine without this issue, so it isn't the cable or the network itself.
    I am now unable to login on any wired network.  And it now appears I am unable to create an ethernet connection anymore.
    Has anyone resolved this issue?

  • Mac mini works strange with Xerox XA7-19i LCD

    Hello!
    I bought a brand new Mac mini and connected it to my Xerox XA7-19i LCD which works fine with my PC. It has cable with DVI connector, and cable is not removable (other side is built-in in LCD).
    After I power-on Mac LCD just blinks and after few seconds monitor reports "No signal". After pluging-out and then pluging-in DVI cable, I get the picture. And I have to repeat that every time. I have also BootCamp with WinXP which boots just fine without re-pluging the cables. MacOSX also doesn't detect refresh rate of this LCD. In MacOSX it reports only 60Hz, while in WinXP it works at 75Hz.
    I borrowed Dell LCD with VGA cable and it works fine in MacOSX and WinXP, so I'm pretty sure that the problem is about properly detecting Xerox LCD while booting MacOSX.
    Does anybody know any drivers or something like that for Xerox LCD for MacOSX?
    Mac mini   Mac OS X (10.4.7)   1,66 Intel Core duo, 1GB RAM/100GB HDD/SD/BT/AP

    Hello!
    I found a "solution". It is not what a wanted but it is as closest I can get.
    If I don't turn on monitor before I turn on Mac everything goes well.
    So when I'm turning on Mac a wait for 15sec before I turn on the monitor. After logging, I change resolution to 1280x1024@76. Thing that I have to do before tuning off Mac mini is to set back resolution to 1024x768 or 1024x820 and turn off the monitor (don't leave monitor in standby).
    If I want to change boot disk at booting time I have a problem, because after holding Option key it boots up in BootCamp and waits for boot disk selection. If I turn on monitor after 15sec the screen is black. Solution for this is that BootCamp always selects first MacOSX volume, so if I want to boot in MacOSX I have to just press Enter, if I want to boot WinXP I have to press Tab then Enter.
    That is the only solution in which I don't have to plug out and back in DVI cable.
    Is it possible to make some script which will change automatically resolutions on logging in and out?
    Thanks!
    Marko

  • BEx Analyzer workbook working strangely with reset_area functionality

    Hi Experts,
    In my BEx Analyzer I have got an input ready query for planning. It displays data correctly. In my workbook I have a button for variables, a button to save the data to planned cube and a button for reset. For the reset button i have used the function reset_area.
    Problem - Reset button works clears the analysis grid with data. But once the data is saved reset button will not work. We have to click on the variables button to reset the grid. So again the variables screen will pop up. As a result the end user is confused. Is there a unique behavior for BEx Analyzer. User found that reset button is not working after saving a result.
    Is there any workaround for this. Please clarify on the issue.
    Thanks and Regards,
    Jerry

    Hello Jerry,
    Functionality of reset will work only before Save ,once data is been saved no reset operations can be performed.
    After Save only refresh is performed which can fetch you the data been saved .You can educate users that reset can be done only until save the data once data is been saved they can't system can't erase it completely however they can change key figure values.
    Can refer to link below:-
    http://help.sap.com/saphelp_bpc70sp02/helpdata/en/45/9d0fbe42c40063e10000000a11466f/content.htm
    Hope it may help.

  • Shared Components Privileges works strange

    Hi all,
    I try to give some group rights to create his own templates javascripts, images etc.)
    Behavior of this right is quite strange: User could create template and after he saved it once, he could only open it.
    Why he hasn't possibility to change it?
    It looks like gap in Portal security.
    Am I right or its just the feature.
    Thanks
    Marcin

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by chetan.kashyap ([email protected]):
    Marcin,
    You should be able to "Edit" the templates created by you. Just check it properly.
    <HR></BLOCKQUOTE>
    I've checked - I have right to create f.e javascript, but when I try to edit, I got message:
    Error: User MSKITEK has insufficient privileges to Manage Shared Components (WWV-10607)
    I also check user rights; I have right "create" in shared component section.
    Any suggestion?
    Marcin
    null

  • Apcupsd working strangely after system upgrade [SOLVED?]

    I'm having an odd problem with the apcupsd (3.10.17-1) package in the Community repo.  I'm running a Back-UPS RS 1000 according to apcaccess.  It was working swimmingly through a USB connection until recently.  I have the timeout set to 0 and the automatic shutdown set when the battery reaches 5%.
    After my system-wide upgrade, there popped up a problem.  Although 'apcaccess status' tells me that my unit is online and the battery charge is at 100% and the load and timeleft is reasonable, the daemon doesn't actually use this information when a switch to battery happens.
    When there is a switchover from a power-outage, the system shuts down (despite timeout set to 0).  Later when I check the log in /var/log/apcupsd.events, it says, for example,
    Fri Jul 15 19:24:11 EDT 2005 apcupsd 3.10.17 (18 March 2005) unknown startup succeeded
    Sat Jul 16 18:11:26 EDT 2005 Power failure.
    Sat Jul 16 18:11:26 EDT 2005 Reached remaining time percentage limit on batteries.
    Sat Jul 16 18:11:26 EDT 2005 Initiating system shutdown!
    Sat Jul 16 18:11:26 EDT 2005 User logins prohibited
    Sat Jul 16 18:11:28 EDT 2005 apcupsd exiting, signal 15
    Sat Jul 16 18:11:28 EDT 2005 apcupsd shutdown succeeded
    The first line being when I booted my system.  As you can see, it thinks it reached the 5% limit, despite telling me it had 100% earlier.  It's a new battery and the hardware is not bugging me in any way.
    I've read other people having some trouble with USB after recent upgrades of DBUS (I'm running 0.34-1), or perhaps it is UDev (060-5).  Could this be related?  I'm not sure which upgrade did it because I don't test my apc unit after every pacman -Syu.

    Well, the problem mysteriously disappeared (apparently).  I did update udev... maybe that has something to do with it.  Did no one else have this problem?

Maybe you are looking for

  • Print landscape report in character mode

    Hi! It seems that I should change xxx.prt file in DESFORMAT parameter to match different kinds of printers in order to print landscape report in character mode. Our customers are international wide. How can I do to make this setting meet every custom

  • SAP Script  - resize window / paragraph

    Hello Gurus, I have two problems related to sap script. ( ver 4.6c) I have copied the original order confirmation form from 000 client in diff.languages like FR/DE/EN ( these forms are used by diff. offices in diff. location ) now we have to create a

  • Property Inspector overlaping

    The Property Inspector in my DW CS4 'overlaps' some of the fonts/text and drop down menus found on the Property Inspector, making them somewhat difficult to read at times. I suspect it has to do with screen configuration, but can't figure out what is

  • Transport mechanism?

    hi, can any one send me step-by-step method to transport mech in xi using file level and cms level

  • Manufacturing finished products from other finished product(co11n)

    Hiii all, Please can any body tell me how to avoid or block 261 movement type for some material..? we have some products which are manufactured with finished product then when we use CO11N to report the consumption: automatically that finished produc