Question for Reader.read() !

When I read the documentation for Reader.read(), I am not sure if I understand it right or not.
public int read():
Read a single character. This method will block until a character is available, an I/O error occurs, or the end of the stream is reached.
Depends on what it saying, I think when read() is called, it will always move its cursor to the next, read next character, if it is possible.
Am I right? Any code to prove that? I am trying to do it in my own, if I get it, I will post to here too.

Yeah you're right.
If you use a Reader to read from a file (FileReader), then only three events can happen :
1) there is another character availbale, so read() reads it and moves the cursor to the next character.
2) there are no other character in the stream, so the function returns -1.
3) there is a problem with the file system and an IOException is throwed.
So you can read a file without creating a new thread. In this case, read() never blocks. But there are other sorts of Readers.
For exemple, the PipedReader reads its data from a pipe. The pipe you read from can be empty but will generate no exception or end of stream events. In this case, read() will block until data is available. In most case, you will need to create a new thread to read from a pipe without blocking all your application.
So the answer about wether read() block or not depends in fact of the actuel Channel used, and you need to read the documentation of each of these Channels (FileReader, PipedReader, etc...).
Hope this helps.
Matthieu

Similar Messages

  • Comment Question for Adobe Reader X

    How do I get annotations and drawing markup tools to show up under Comment in Adobe Reader X?

    Use the forum for Adobe Reader.

  • Question for Kappy: reading DVD in a PC

    I am planning on scanning hundreds of 35 mm.slide films with my Mac (OS X) using brand new, unformatted DVDs to send to a friend in Sweden who has a PC. Will she be able to read those small JPEG scanned files?

    If you've got an internet connection Dropbox should work - it's nothing to do with Apple's iCloud. It's free (for 2gb of storage) and works with Mac, Windows and Linux. There's more information here with a short demonstration video:
    https://www.dropbox.com/

  • Please read my question carefully, this is, I think, a question for the experts. It's not the usual name change question.   When I setup my new MacBook Pro, something slipped by me and my computer was named First-Lasts-MacBook-Pro (using my real first and

    Please read my question carefully, this is, I think, a question for the experts. It's not the usual name change question.
    When I setup my new MacBook Pro, something slipped by me and my computer was named First-Lasts-MacBook-Pro (using my real first and last name).
    I changed the computer name in Preferences/Sharing to a new name and Preferences/Accounts to just be Mike. I can right click on my account name, choose advanced, and see that everything looks right.
    However, If I do a scan of my network with my iPhone using the free version of IP Scanner, it lists my computer as First-Lasts-MacBook-Pro! And it lists the user as First-Last.
    So even though another Mac just sees my new computer name, and my home folder is Mike, somewhere in the system the original setup with my full name is still stored. And it's available on a network scan. So my full name might show up at a coffee shop.
    Can I fully change the name without doing a complete re-install of Lion and all my apps?

    One thought... you said the iPhone displayed your computer's old name? I think that you must have used the iPhone with this computer before you changed the name. So no one else's iPhone should display your full name unless that iPhone had previously connected to your Mac. For example, I did this exact same change, and I use the Keynote Remote app to connect with my MacBook Pro. It would no longer link with my MacBook Pro under the old name, and I found that I had to unlink and then create a new link under the new name. So the answer to your question is, there is nothing you need to do on the Mac, but rather the phone, and no other phone will display your full name.

  • I meet a question for HP53131A to read parameter on screen!

    I meet a question for HP53131A to read parameter on screen.It will no respond when I load a HP53131readmessage.vi directly.It can pass when I use the highlight execution.I try to add some delay.It is no any effect.Could you please to help explain why?I should how to do with this case?Would appreciate your suggestion.

    Can it make the test program run slowly when you use the highlight execuation? How to do in the test program if I want to run this execution? Can I use the delay to make the test program slowly? It is urgent. This problem take me one month and still can't finish.Do you have any suggestion? 
    Attachments:
    HP 5313xAReadmeas.JPG ‏171 KB

  • Questions regarding Adobe Reader Extensions for Adobe Livecycle.

    Hi,
    I'm relatively new to Adobe products, having just started to use Adobe Livecycle over the last couple of weeks. I've produced a set of interactive forms for field engineers to use. When completed, they will submit the xml data via email. However, there will be numerous occasions where they will need to stop in the middle of data collection and come back at a later point to finish, hence the need to locally save the information before submission.
    I understand this is where Adobe reader extensions would come in, unlocking this functionality.
    At the moment, i'm a bit of a loss on several points regarding how reader extensions work and i was wondering if anybody could fill in the gaps:
    1. Are they seperate modules that bolt in into the main Livecycle application?
    2. As these forms will be used off line, i would like to set the permissions to the pdf locally. From what i read, Reader Extensions is a server product. Is this correct, or can i use Reader Extensions to set these permissions before publishing the adobe form?
    3. Where can i get hold of Reader Extensions and how much do they cost? I have been reading information on similar topics on this forum (dating 3-4 years ago) that say reader extensions are comparitavely expensive to a Adobe Pro/Livecycle licence. ($50,000 upwards) Is this correct? If so, is there a cheaper alternative to achieve the same outcome?
    I hope someone can shed some light on these points!
    Thanks in advance.
    Rob

    Reader Extensions can be bought as a module in LiveCycle. There is a subset of RE functionality that exists in Acrobat. The ability to save locally is part of Acrobat. In both cases you woudl RE the form before distributing it, hence when the user gets your form they are ready to go. You can download a trial version of the server product. As far as pricing goes you woudl be better to talk to an Adobe salesrep as there are discounts for certain situations as well as different pricing options. If you decide tp gp the Acrobat route you ar limited, by licence, to distribute your form to a max of 500 users.
    Hope that helps
    Paul

  • Is there a 64 bit install for Adobe Reader?

    Hello,
    I want to make a note that I did a search on the form, using the following text
    "Is there a 64 bit install for adobe reader?"
    And I did not find my answer.  That is why I'm posting this as a question.
    So, with that out of the way....
    I am getting ready to build a new computer for myself, and will be running Windows 7 Enterprise 64 bit.  Before I begin, I want to make sure I have all of my software that I want installed, and I am doing research on each program to see if there is a 64 bit version that can be installed.  What I would like to do is have as many as my programs that I install be 64 bit as possible.  I know that not every program will be 64 bit, but I did want to get as many of them as possible to be 64 bit applications.
    As I do want a PDF reader on my computer, and I have used Adobe Reader for years, I started looking on the web site to download the current version.  However, I did not see any place that I could download a 64 bit version of Adobe Reader.
    That is why I'm here asking.  Is there a 64 bit version of Adobe Reader that I can download?  If so, where is it on the web site?
    This does lead me to a follow up question.  Is there a 64 bit version of the Flash Player, as well as the Shockwave player?  If so, where can I download them from as well.
    Thanks in advance,
    --Brian Plencner
    [signature deleted by host]

    Again, I think you need to check the Microsoft web page, as I was able to find 64 bit versions of IE8 for download.
    The URL to access the page is
    http://windows.microsoft.com/en-US/internet-explorer/downloads/ie-8
    From that page, I am able to select a 64 bit version of IE 8 for the following Operating Systems
      -- Windows XP 64 Bit
      -- Windows Vista 64 Bit
      -- Windows Server 2003 64 Bit
      -- Windows Server 2008 64 Bit
    Windows 7 is not listed as an option as it already comes with IE8 installed by default.
    Looks to me that Microsoft has already released a 64 bit version of IE8.
    In fact, I went ahead and downloaded IE8 for Windows 2003 Server x64 bit, and looked at the details of the file.  Each microsoft download has a digital signature associated with them, showing a date and time of when the exe was built.
    According to what is shown below, IE8 for Windows Server 2003 has been around since Sunday, March 08, 2009.
    So, what has adobe been doing since March of 2009?  IE8 has been 64 bit for well over 2 years now (it will be 3 in March of 2012). While I know that it does take time to develop new applications, I don't think it would take 3 years for Adobe to come up with a 64 bit version of Reader that could have been built under the 64 bit platform.
    --Brian

  • Looking for a Reading Comprehension app for third graders ?

    I have been searching the iPad App Store for good reading comprehension apps. But none that seem to be what I am looking for. I am looking for ones that have reading stories and then test questions related to the stories. Anyone knows of any ?

    Hi,
    As part of our "Special App for That" series, we wrote an article on apps that support literacy instruction that might be of interest to you or others looking or apps for children with special needs. We do recommend some apps that are universal for children of many different abilities.
    http://www.inov8-ed.com/2011/03/theres-a-special-app-for-that-part-7-apps-that-s upport-literacy-instruction/
    It is part of a series that we have been writing on using the iPad, iPhone and iPod Touch to help support children/students with special needs. You can see the entire series here:
    http://www.inov8-ed.com/category/special-app-for-that/
    I hope that might be of interest to you or some others.
    Thanks.
    - Andrea Prupas
    inov8 Educational Consulting
    http://www.inov8-ed.com

  • How to install several specified languages for Adobe Reader X

    Hi guys, just question that how to silencely install several specified languages for Adobe Reader X?
    I know some silence switch as below:
    setup.exe /sAll /rs
    =>  Silencely install all supported languages
    setup.exe /sAll /rs /sl "xxxx" (xxxx is LANG ID)
    =>  Silencely install one specified language only (defined by LANG ID)
    Question:
    If I would like to silencely install several specified languages, is there any other switch to do that?
    Thank you all in advance.

    Hi,
    I'm using Adobe Reader X MUI version and I tried your way but doesn't work unfortunately.
    I attached the setup.ini content below =>
    ============
    [Startup]
    RequireOS=Windows 2000
    RequireMSI=3.0
    RequireIE=6.0.2600.0
    [Product]
    msi=AcroRead.msi
    Languages=1033;1036
    1033=English (United States)
    1036=French (France)
    [Windows 2000]
    PlatformID=2
    MajorVersion=5
    ServicePackMajor=4
    [MSI Updater]
    Path=http://ardownload.adobe.com/pub/adobe/reader/win/8.x/8.0/misc/WindowsInstaller-KB893803-v2 -x86.exe
    =============
    And I used the switch of "Setup.exe /sAll /rs /ini "setup.ini""
    My OS is Windows 7 Ultimate.
    Thank you.

  • Cost for Enabling Plug-in for Acrobat Reader

    Hi,
    I read the developer note and noticed if I want to enable my plug-in for Acrobat Reader I need "Visit the Adobe web site and fill out an Adobe Reader Integration Key License Agreement."
    I heard the cost is 100 US dollars per license. I am a bit confuse with it. The cost is $100 for each plug-in no matter how many copies I distributed in company. Or $100 for each computer I want to install my plug-in?

    Hello,
    my question is also related to the integration of our plugin into Acrobat Reader.
    I fulfilled the application form for the Reader Integration Key License Agreement and I sent an email to [email protected] but I received an error that is the email account doesn't exist.
    I didn't manage to find a valid account where I can send the form.
    Thanks in advance for your help.
    Regards.

  • Recently bought 4S, it keeps searching for network, reads invalid SIM, keeps searching for network, have switched the handset on and off several times, have tried 2 new micro chips, re set the network too ! nothing seems to be working !!! Iam in Delhi

    recently bought 4S, it keeps searching for network, reads invalid SIM, keeps searching for network, have switched the handset on and off several times, have tried 2 new micro chips, re set the network too ! nothing seems to be working !!! Iam in Delhi

    Obvious question... where did you buy your 4S and is factory unlocked?

  • Which Base MSI to Use For Adobe Reader Updates?

    I am new to creating AIP for Adobe Reader and am wondering which MSI to use as the base installer.  From what I understand, to create an AIP for Adobe Reader 11.0.07, I need to first have the AIP created for 11.0.00 and then patch it using the 11.0.07 MSP file.  (the 11.0.07 MSP file contains all other updates found in earlier quarterly releases and OOC releases)
    So my question is on obtaining the correct MSI file for creating the original 11.0.00 AIP.  My options for obtaining the correct MSI are threefold:
    The original 11.0.00 MSI (AdbeRdr11000_en_US.msi) (only one msiexec comand required)
    The original 11.0.00 EXE (AdbeRdr11000_en_US.exe) (extract the files from the exe, then run the msiexec command)
    The new 11.0.07 EXE (AdbeRdr11007_en_US.exe) (same as previous item)
    I noticed that the MSIs in the AIP are named "AcroRead.msi" when extracted from an EXE file (#2 and #3 above) but named "AdbeRdr11000_en_US.msi" when extracted from the original MSI file (#1 above).  Are all three of these resulting MSIs the "same"?  They all have different MD5 hashes but otherwise appear identical.
    Once I have the original AIP for 11.0.00 backed up, I should be able to reuse it when new quarterly releases come out.  Can anyone help please?  What is recommended?  Thanks!

    No one answered, but I think probably all can be used.  I made a script that will automatically extract and build the AIP from the most recent EXE file provided by Adobe.  Why Adobe doesn't create a new MSI themselves is beyond me.

  • How to register Plugin for Adobe Reader X (10.0)?

    Hi,
    I have received Adobe RIKLA license with digital certificate (.rc) and it's working fine in Adobe Reader 9. I used SignPlugin method register our Plugin with Adobe Certificate. My question is 'how to proceed for Adobe Reader X (latest version)?'. Please provide some pointer.
    Thanks in advance!

    Thanks Ironsenth, it worked for me in Adobe Reader X.
    But the problem is, my toolbar is appearing in Right-Hand side panel unlike Adobe Reader 9. How can I drag my toolbar in the proper position like Adobe Reader 9.

  • DMSIntegration sample plug-in for Adobe Reader problem

    Hi,
    I have the following question:
       I created sample DMSIntegration plug-in module and copied in "plug-ins" folder for Acrobat Reader.
       The custom Save As dialog box with the the caption "DMS - Save AS..." does not appear.
    What is wrong?
    Thank you,
    Zbigniew

    See the posting in the forum for Acrobat SDK.

  • Can not find the download for Acrobat Reader 8.1.6 for Solaris

    Found this link,
    http://www.adobe.com/support/downloads/product.jsp?product=10&platform=unix
    But when selecting 8.1.6 it brings me to the downl
    od for 8.1.7. Does anyone knows how to get 8.1.6 for Solaris?

    Post your question in the forum 'Adobe Reader for Unix'.

Maybe you are looking for