Buffered Reader Question about wrapping around another Reader

I'm reading about BufferedReaders and in the API the following paragraph reads:
In general, each read request made of a Reader causes a corresponding read request to be made of the underlying character or byte stream. It is therefore advisable to wrap a BufferedReader around any Reader whose read() operations may be costly, such as FileReaders and InputStreamReaders. For example,
BufferedReader in = new BufferedReader(new FileReader("foo.in"));
I was wondering if somebody could explain their reasoning in slightly less complicated terms...I can't really figure out what their reasoning is. Thanks

If every time you wanted to read a character, you had to talk to the hard disk device, it would be very slow. This is because communicating with the disk is thousands of times slower than communicating with main memory.
The buffered reader reads in chunks, buffers those data, and allows you to request them one character at a time.

Similar Messages

  • Image enduser workstation: question about ACF and Adobe Reader component

    Our IT department is investigating what components should be included in the image for enduser workstations to ensure they will be able to work with interactive forms without any problem. I know ACF and Adobe Reader are the only requirements for endusers but I have some questions about this:
    1. As of what version of Netweaver 2004s is it no longer a requirement to have the ACF component installed on the frontend to enable online interactive scenario's for endusers?
    2. Can I recommend to allways install the very latest Adobe Reader version available in the market or is the Adobe Reader version depending on the SAP NetWeaver version we use?
    kind regards
    Angelique Heutinck
    ([email protected])

    Hi Angelique,
    The non ACF version is called Zero Client Installation (ZCI)
    ERP2005 SP 5 - Zero Client Installation (ZCI)
    NW04S Stack 08
    Reader 8.0 for ZCI, Reader 7.08 for ACF based forms. Don't use Reader 8 for ACF yet, since there is no installer working yet...
    Cheers,
    Noë

  • Security question about opening PDFs in Reader as opposed to Standard or Professional

    Our ITC wants us to open all downloaded PDFs in Acrobat Reader 9 as opposed to Acrobat 7.0 Standard. We currently have both. We download a lot of PDFs and frequently need to Reduce File Size or extract pages, etc. I am hoping to upgrade my Acrobat 7.0 Standard to Professional 9.
    Is there a valid security reason to always open first in Reader? Based on what I have read Acrobat Reader 9 and Professional 9 both had security risks and it is my understanding that a patch has been released today.
    Is there a security risk still for Acrobat Professional 9 and is there a security risk for Acrobat Standard 7.0? Does requiring us to download, save and open PDFs in Reader 9 first make sense from a security standpoint?
    Thanks very much for any input.

    I don't remember any claims that Reader was safer than Acrobat. I use Acrobat exclusively and Adobe recommends against installing both due to conflicts (they use a lot of the same files). The biggest factor to be careful about is to not open any attachments or applications that may be built in. These can be put in the PDF and both Acrobat and Reader open such tools. I would tend to question the basis for the IT folks decision, particularly based on the Adobe recommendation and problems that it creates. At least that is my opinion.

  • Have questions about iOS 4.2-read this

    http://www.maclife.com/article/howtos/22ios_42_tips_tricks_andfeatures

    1) What is the name and version of Application and Web
    Server which "j2eesdk-1_4-windows[103MB]"(JDK1.4.2)
    and "NetBeans3.6" has within itself, if there is any
    Application & Web server?
    j2eesdk-1_4-windows comes with SJSAS PE 8.0 a fully J2EE 1.4 compatible app server. NetBeans 3.6 comes with Tomcat 5.0, an HTTP server and web container.
    2)Where to locate my JSP & Servlet Programs to run
    proper with the above Application and Web Server, if
    there is any Application & web server?
    In Netbeans use the help facility to read about deploying servlets and JSPs to the integrated Tomcat server. For J2EE SDK see the following: Chapter 3 of the J2EE Tutorial at http://java.sun.com/j2ee/1.4/docs/tutorial/doc/index.html Also see Developer's Guide at http://docs.sun.com/source/817-6087/dgdeploy.html
    3)Do I have to uninstall my already installed
    WebLogic6.1 server on Windows to run my JSP & Servlet
    Programs with the above Application and Web Server, if
    there is any Application & web server?
    You should not have to uninstall WL as long as their are no port conflicts.

  • Adobe Reader Question about protected password

    I have adobe reader on my computer and I need to email an pdf file and password protect it, is that possible with the reader version?

    Kimberly,
    Moving this question to the Adobe Acrobat forum, since it's not related to CreatePDF.
    No, you cannot password protect a PDF with Reader. This requires Adobe Acrobat. See the "Protect" section here. A trial is here.
    Dave

  • Unix Domain Socket - Question about work around

    Since Unix Domain Sockets are platform dependent and Java is platform independent, it does not support it.
    However, I am sure some of you have worked with them and found some good work around.
    Elsewhere Jtux was suggested as a possible fix. However, I have not seen any good testimonials to it working. Also, if there are any security issues with this software. The website is here: http://www.basepath.com/aup/jtux/
    Does anyone have any other suggest?
    Thanks.

    I am modifying a current app. I must use the Unix
    Domain Sockets. I have no choice in the matters. It's
    for security reasons that they must be left in place.I can only guess that you do not understand my suggestion.
    The proxy does a domain socket to regular socket - just a pass through. You write this in C/C++.
    In your java app, as one option, you use Runtime.exec() to start the proxy. Then you use a java socket to connect to it. You can pass options to the proxy to control the socket behavior on both ends.
    In terms of usage there are a number of variations on the above.

  • HT1386 Question about synch to another iphone

    I went to sych with another iphone to update my itunes.  Instead I got all the contacts and apps, pics, etc. of the other person.  How do I reverse this.

    How did you do this and to update your iTunes? There is no updating of iTunes on an iPhone. iTunes is not on an iPhone.
    Did you install an iOS update with iTunes on a computer besides your own?

  • I have a question about Lightroom 5... I used it last night, I go to get on it today and its will not open. I have an error msg "Lightroom encountered an error when reading from its preview cache and needs to quit" Lightroom will attempt to fix the proble

    I have a question about Lightroom 5... I used it last night, I go to get on it today and its will not open. I have an error msg "Lightroom encountered an error when reading from its preview cache and needs to quit" Lightroom will attempt to fix the problem when reopened

    https://forums.adobe.com/message/6219922#6219922
    See if the issue in the thread above helps you to solve your problem.

  • I have a Macbook Pro june 2011... I have 8GB ram but I only have 256mb VRAM... I've read some other questions about this and I realized... Why do I not have 560mb of VRAM since I have 8GB of RAM? Is there any way to get more VRAM to play games on steam?

    I have a Macbook Pro june 2011... I have 8GB ram but I only have 256mb VRAM...
    I've read some other questions about this and I realized... Why do I not have 560mb of VRAM since I have 8GB of RAM?
    Is there any way to get more VRAM to play games on steam?
    I've learned  by reading other topics that I can't upgrade my graphics card on my Macbook Pro because it's soldered into the motherboard or somthing like that, but please tell me if there is any way to get more video ram by chaning some setting or upgrading something else. I'd also like to know why I only have 256MB of VRAM when I have 8GB of RAM, since I have 8GB of RAM I thought I was supposed to have 560mb of VRAM...
    So the two questions are...
    Is there any way to upgrade my VRAM, so that I can play games on steam?
    Why do I only have 256MB VRAM when I have 8GB total RAM?
    Other Info:
    I have a quad core i7 Processor.
    My graphcics card is the AMD Radeon HD 6490M.
    I am also trying to play games on my BOOTCAMPed side of my mac, or my Windows 7 Professional side.
    THANK YOU SO MUCH IF YOU CAN REPLY,
    Dylan

    The only two items that a user can change on a MBP are the RAM and HDD (Retinas not included).  You have what the unit came with and the only way you will be able to change that is to purchase a MBP with superior graphics
    If you are very much into gaming, the I suggest A PC.  They are far superior for that type of application to a MBP.
    Ciao.

  • Hello , I want to ask some question about ipads \  How powerful is the iPad?  How useful is it for reading books, newspaper or magazines or for surfing the web? Can you identify any shortcomings of the device?   please help me :(

    Hello ,
    I want to ask some question about ipads \
    How powerful is the iPad? 
    How useful is it for reading books, newspaper or magazines or for surfing the web?
    Can you identify any shortcomings of the device?  
    please help me

    it's less powerful than your average computer. THink of it like a netbook but with a better processor.
    It'll do fine for surfing (although if you browse a lot of flash based sites you will need to get a third party browser since safari doesn't accommodate it)
    You may do OK on reading books, papers or magazines, especially if they have apps, but the ipad's screen is backlit, so it doesn't work well outdoors and you may need to fiddle with the brightness so that you don't get eye strain (it's just like doing too much reading from a computer screen)
    I would say the biggest short comings are data transfer. Apple's preferred work flow is that everything is done via iTunes or the internet....well people dont' always have 100% reliable always on internet access so you can find yourself in a situation where you can't get things on/off the iPad.
    By and large, it's a good device for day to day stuff, but is not a computer replacement.

  • Questions about reading/writing with output and input streams

    I'm getting a bit confused on this subject. I have written an array of doubles to a file, and now I need to know how to read them back in to another array. I have also wrapped each double into its own object, but I need to know how to write those to a file, and read the doubles contained in them back into an array.
    Here is what I have so far; the method that writes the array of doubles to a file.
    public void writePrimDoubles() {
              DataOutputStream outStream;
              System.out.println("Now writing the values to file...");
              try     {               
                   outStream = new DataOutputStream(new FileOutputStream("file.dat"));
              catch (IOException ex) {
                   System.out.println("Error opening file");
              return;
              try {
                   for(int i = 0; i<arraySize; i++)
                        outStream.writeBytes(numberArray[i] + "\n");
                   outStream.close();
              catch(IOException e) {
                   System.out.println("Error writing to file");
         }

    * writes all doubles in the given array to the file 'file.dat'
    public void writePrimDoubles(double[] array) throws IOException {
       DataOutputStream out = new DataOutputStream(new FileOutputStream("file.dat"));
       for(int i=0; i<array.length; i++) {
          out.writeDouble(array);
    out.close();
    * reads in all stored doubles from the given file ('file.dat').
    * cause of each double has been written to a 8byte part of the file
    * you could get the number of doubles stored in the file by dividing
    * its filesize by 8.
    * Alternatively you might first store all read doubles as Double in
    * a list (e.g. java.util.ArrayList). After reading all doubles you could then
    * create a new double[] with the lists size (double[] array = new double[list.size()];)
    * -> this alternative is commented out in the following code.
    public double[] readPrimDoubles() throws IOException {
    File file = new File("file.dat");
    DataInputStream in = new DataInputStream(new FileInputStream(file));
    double[] array = new double[file.length()/8];
    for(int i=0; i<array.length; i++) {
    array[i] = in.readDouble();
    in.close();
    return array;
    ArrayList list = new ArrayList();
    try {
    while(true) {
    list.add(new Double(in.readDouble()));
    catch(EOFException e) {} // catchs the exception thrown when end of file is reached
    in.close();
    double[] array = new double[list.size()];
    for(int i=0; i<list.size(); i++) {
    array[i] = ((Double)list.get(i)).doubleValue();
    return array;
    For further information on the classes you have to use you might have a look to the concerning API documentation (http://java.sun.com/j2se/1.4.2/docs/api/). In this docs you could find all methods, constructors and fields accessable for a class.
    have fun...

  • Question about Reader DRM activation

    Hi All
    I got a paper "FAQ ACS Discontinuation of Sales, November 30, 2004"
    I have a question about ACS.
    As I konw, ACS is discontinued effective November 30, 2004.
    and I read a section in paper below:
    Q. Will Adobe Reader and Acrobat users get support from Adobe for eBook issues?
    A. Support is not available for the free Adobe Reader, however, assistance for user activation is
    available until December 31, 2006.
    Does it mean Reader activation service will be stop until December 31, 2006?
    That's a big problem for our ebook service!!

    Adobe communicated in January to ACS customers that the DRM Activator service would remain operational until December 31, 2007, one year longer than previously announced.
    If you didn't receive this announcement, send your contact info (email and surface mail) to "[email protected]".
    You'll receive an autotmated reply that your email bounced but it will then be manually confirmed.

  • Have some issues downloading itunes. getting a pop up that reads MSVCR80.dlll and another one pops up and reads something about a moblie device

    have some issues downloading itunes. getting a pop up that reads MSVCR80.dlll and another one pops up and reads something about a moblie device

    See Troubleshooting issues with iTunes for Windows updates.
    tt2

  • Basic question about accessing card reader from browser

    Hi,
    I am very new to card technology. I have a very basic and general question not directly related to java cards.
    I need to write a web application that allows the user to read a card with a card reader.
    For that I maybe need to write an applet that has to access a native DLL and call methods
    to get the card ID. I already have that DLL (written in Delphi) that reads multi-technology cards.
    Then pass that ID to the application server to retrieve complete information
    about the card holder and display them on the user browser.
    Please could someone guide me on useful resources for that kind of development, for example
    already existing developments, personal experience, design solutions ?
    Thanks.
    Adriano

    Hi Joseph,
    One thing I forgot to tell is that I work with contactless cards and readers.
    Contactless cards use radio frequency. Despite this fact, the problem stays the same. I already have a Delphi DLL that reads contactless cards.
    What I need is a way to retrieve card holder information from a client browser. The card contains a unique ID. My idea is to use an applet that reads that ID on the client-side and then calls a servlet on the server-side to retrieve holder information associated with that ID, i.e. first and last names, and finally displays them on the client browser.
    So the card contains only the unique ID, a database on the server-side contains all other related data.
    Technically the applet has to call the DLL via JNI.
    Do you think that using an applet that way is a good solution, do you see simpler solutions, is there security issues ?
    Thanks.

  • A question about creating READ ONLY users.

    Dear all,
    I have a question about read only user accounts and I would appreciate if you could kindly give me a hand. I have a schema named SCHEMA1. Whenever I want to connect by using sqlplus I run the following:
    sqlplus user1/[email protected] SCHEMA1.WORLD is the entry in the tnsnames.ora referring to the schema SCHEMA1.
    I need to create a read only user who is able to SELECT all tables and views created by user1 on SCHEMA1 (this user will not modifiy anything at all. The user is used only for a person using SQL queries to read data). for several tables I write the grants explicitly, for example:
    CREATE USER user2 IDENTIFIED BY user2;
    GRANT CREATE SESSION to user2;
    GRANT SELECT ON S001_COR_ECLASS TO user2;
    GRANT SELECT ON REF_ECLASS511 TO user2;Is there anyway to do the same thing but for all the tables (because there are a lot of tables and views)? Besides, even with these granted permissions when the user connects with SQL Developer to the database, he is not able to view the list of tables/views in SQL Developer GUI. What causes this problem?
    Thanks in advance,
    Dariyoosh

    Hello Dariyoosh,
    he is not able to view the list of tables/views in SQL Developer GUIyou can either go to "Other Users" - user1 - tables. There you see every table you have permission to select.
    Or you can create a synonym in schema2 for each table in schema1 and set a filter on the tables node of user2 "Include synonyms".
    Regards
    Marcus

Maybe you are looking for