[jdk1.4] What's the pro of using a Buffer against an array?

Hi all,
I was studying the new java.nio classes and I have a question:
what's the main advantage to use a Buffer (let's say an IntBuffer)
against an array of int ?
As IntBuffer need to be allocated with the number of elements....
IntBuffer ib = IntBuffer.allocate(2);
why not simply using a fast array of int [] rather ?
Under which circumstances can be useful an IntBuffer?
thanks
Francesco

The latest JDC Tech Tip discusses this briefly. I think the real benefit lies in the fact that the stream can read directly into the buffer so there is no need to read to a buffer, then copy to the array.
Check out the June 4th Tech Tip. Hope this helps.
http://developer.java.sun.com/developer/JDCTechTips/

Similar Messages

  • HT204053 What are the pros and cons of 1) choosing to use the SAME Apple ID for iCloud services on one side, and purchases on the iTunes Store, App Store, and iBookstore, on the other side; or 2) to have and use two separate Apple Ids for these "two sides

    All is in the title, so I repeat it below with a better identation.
    What are the pros and cons of
    1) choosing to use the SAME
                                                  Apple ID for iCloud services on one side, and
                                                  purchases on the iTunes Store, App Store, and iBookstore, on the other side; or
    2) to have and use two separate Apple Ids for these "two sides"?
    P.S.
    I have loads and loads of free podcasts in iTunes in my iMac, that are certainly more thant the 5 gigas the iCloud provides for free, so I don't want those to go to the cloud. But this is perhaps a different question...
    Also need to mention that I have itunes on a mac, a pc and an iphone.
    Sorry to look so silly with this question, but I don't get the "big picture".

    You need to create a user account for your wife (or yourself depending on who has the current user account). When syncing, each of you should sign in as a separate user, login to iTunes and then sync. I had this problem when my sister got an iPhone. When we did her initial sync, everything on my iPhone showed up on hers. Apple gave me this solution.

  • What are the pros and cons re using an intel iMac vs MacPro with LP8?

    I'm considering getting a new intel Mac in the near future (presuming a new MacPro will be released in the near future - maybe at the same time as Leopard). I compose largely for film and television and I am composing largely using a combination of loops, software instruments and some recorded live performance. I usually sync to a low res quicktime movie.
    I do like the idea of a simple and uncluttered work environment with an iMac, added to which there's also a degree of portability with the iMac however the MacPro is obviously more powerful. I'm not sure how much the difference in power between the two computers would affect me.
    Would I be compromising myself much if I went for the iMac over the MacPro? What are the pros and cons of the iMac vs the MacPro in relation to Logic Pro 8?

    In the world large-scale music composition using samples, loops, etc (especially for film) your two biggest needs are RAM and HD speed/access. The imac looses big time in this department (as a single computer at least) as it can only be upgraded to 4gb ram, and only holds one internal HD, and also lacks any PCI expansion for DSP cards, audio interfaces, etc.
    In generalyou want to separate your data vs applications as much as possible, to ensure both can be accessed quickly and easily by the computer. So its best to have your system software / applications on one internal HD, and your logic data (samples, audio recordings, loops) on another drive(s). You can do this with an iMac via USB, FW800, & FW400, but depending on how big your projects get, how many USB and FW drives / interfaces you use, and how much data you need to stream, you could overload the buss on the imac (not sure if it has multiple busses or not). Plus speed wise, internal SATA are much faster than external drives, and the mac pro with its 4 internal slots seems like a great choice for speed and flexibility.
    However, if you dont find yourself doing large scale projects, then you might be better off going with an imac. We just purchased one for my father and it runs great! It blows the socks off of my Dual 2.5 G5 tower in terms of CPU speed! If you run into problems running things from the imac, you could always add a mac-mini down the road to stream sample libs, as a Logic node, etc, which seems to be a much more cost effective solution.
    I hope this was helpful, but I probably just made the decision harder . In fact, if I were to start over today, I dont know if I'd go with a MacPro, or an iMac / mac mini combination. they both seem to have their advantages / disadvantages.
    Best of luck!

  • Why use e-mail archive? What are the Pros

    Why use mail archive? What are the Pros & Cons?

    gbaustian wrote:
    Tony T1, OK, thanks. So there is no space savings or compression, just another folder. Then why have it??
    Convenience.  I always had an Archive Mailbox.  I used to have to select and drag, now I select and click a button.

  • What are the pros and cons of using people keywords, given that my catalogue is already uptodate with regular keywording of all subjects?  e.g., will the people keyword transfer to other programs?, can I use the same name for a people keyword and regular

    What are the pros and cons of using people keywords, given that my catalog is already up to date with regular keywording of all subjects?  e.g., will the people keyword transfer to other programs?, can I use the same name for a people keyword and regular keyword in the same photo?

    What are the pros and cons of using people keywords, given that my catalog is already up to date with regular keywording of all subjects?  e.g., will the people keyword transfer to other programs?, can I use the same name for a people keyword and regular keyword in the same photo?

  • I need to record two camera interview shoots and turn the video around quickly. What is the best solution using a MacBook Pro and final cut pro?

    I need to record two camera interview shoots and turn the video around quickly. What is the best solution using a MacBook Pro and final cut pro?

    Try reimporting all your media: file>>import>>reimport>>continue

  • What are the pros and cons of installing java+abap stack for portal?

    Hi all,
      1.What are the pros and cons of installing java+abap stack for portal?
      2.what effect it does on the ume options to be choosen??
      3.for the purpose of integration of r3,bw and crm on portal and crm 4.0 60.2.3 business package which option of stack(java or abap or both)will be good option and which ume option while installation should be choosen?
    regards
    Rajendra

    Hi Rajendra,
    The NetWeaver Installation Master Guide offers some good scenarios on the pros and cons:
    https://websmp201.sapag.de/~sapidb/011000358700005412792005E.pdf
    In a nutshell:
    ABAP+JAVA
    Pros
    - Decrease # of servers required to administer the portal
    - Less costly
    Cons
    - Upgrades could be dependent on ABAP and Java release level
    - Additional load on the server due to ABAP stack
    - Limited scalability
    JAVA and ABAP on separate server
    Pros
    - Improved performance
    - Allows each system to be single-use purpose therefore downtime does not affect other components
    - More scalable
    Cons
    - Adds complexity to landscape
    - Additional costs
    Regards,
    Thomas Pham

  • What are the pro's and con's (samplers)

    -I hate to beat and dead horse, but Im about to buy some new software, and I trying to make the best choice--
    What are the pro and cons of the major samplers (Im looking for a more radio-ish sound, motif/triton/phantom).
    i.e:mach five, sampletank 2l, exs, and kontact
    (a poster here said Colossus, ive need heard of it are used it--or HALion(is this only for pc's)--gigastudio(same questions as halion).

    Samplers do alot of things, what do you need a sampler for?
    Korgs remind me of alot of presets and alot of verb and chorus. I guess if you're posting here you already have EXS and want more sounds or more functionality and if the korg thing is true you lean more to sampling/synthesis than instrument recreation (as in you probably aren't going for VSL if the korg caught your ear). Independence looks really cool, it's quite new. Kontakt is demanding and very flexible, both include huge libraries and I know kontakt has tons of great filters, FX, modulation. It also needs a pretty strong update-which is being dealt with after a year or so.

  • What are the consequences of using mismatched wattage power cords on macbooks?

    I am fortunate enough to have a macbook air, a macbook pro, and a macbook at my house. Sometimes the power cords get mixed up. What are the consequences of using the lower wattage macbook air power cord with the macbook pro and vise versa?
    Paul

    It will work but it isn't recommended. The PSU of the MBA will be charged for the maximum amount of power it can deliver so it might break sooner than normal, but I doubt you'll ever notice it if you're not doing this on a daily basis. It might also be possible that your MBP will not charge (as fast) from the MBA PSU.
    The other way around is no problem since the device will only ask as much power from the PSU as is needed.

  • What are the pros and cons of a solid state drive for imac?

    What are the pros and cons of a solid state drive for imac?
    I wonder if the SSD is good for replacing a failing hard drive?

    However they are dramatically faster than magnetic disk drives, useful for startup and shutdown and frequently accessed apps and fi.e

  • What's the difference between using this & Adobe Catalyst?

    What are the pros and cons of each compared to each other?  Would appreciate specifics, thanks.

    Hello,
    I've spoken with the development team and they have explained FC like this:
    Flash Catalyst is a professional design tool  for interaction design. It helps designers specify not just the visual  layout of an interactive piece, but also exactly how the interactive  elements and transitions will work including designing buttons, scroll  bars, transitions, and more. Flash Catalyst integrates with Flash  Builder, so a designer can either export their design as a final .swf or  .air project, or they can hand it off to a developer to do further work  in Flash Builder. This integration makes Flash Catalyst and Flash  Builder the perfect solution for designing data driven applications  among other things.
    Project ROME is designed for the everyday user who wants to use digital media to better express and communicate ideas. Project ROME’s tools, interface and capabilities are simple but powerful, and do not require expertise in design.
    Essentially, FC enables a sophisticated  designer-developer workflow for professionals while ROME enables  all-in-one media creation for at home, work or school users.
    Thanks for your questions!
    Sarah
    Sarah
    Forum Moderator

  • HT201250 I use Time Machine to back up my entire computer with my external hard drive. I am getting a brand new iMac this month and was wondering what is the process of using this back up to restore my new computer exactly how my old computer was?

    I use Time Machine to back up my entire computer with my external hard drive. I am getting a brand new iMac this month and was wondering what is the process of using this back up to restore my new computer exactly how my old computer was? I want to make sure I will still have various important files on my new computer, like my songs in iTunes, my photos in iPhoto, etc, etc. Thanks so much in advance!

    Welcome to the Apple Support Communities
    When you turn on the new iMac for the first time, Setup Assistant will ask you to restore a backup, so connect the external disk and follow steps to restore all your files to your new iMac. Your new Mac will have the same settings and programs as your old computer.
    In other cases, I would recommend to restore the whole backup without using Migration Assistant or Setup Assistant, but a Late 2012 iMac uses a special OS X build, so the OS X version that you're using on your old Mac won't work on the new one. For more information, see > http://pondini.org/OSX/Home.html

  • What is the real time use of implicit and explicit cursors in pl/sql

    what is the real time use of implicit and explicit cursors in pl/sql.............please tell me

    You can check the following link ->
    http://www.smart-soft.co.uk/Oracle/oracle-plsql-tutorial-part5.htm
    But, i've a question ->
    Are you student?
    Regards.
    Satyaki De.

  • What are the main tables using in vendor performance report.

    what are the main tables using in vendor performance report.
    how many select statements are in ABAP reports.

    Refer the links -
    vendor performance report !!!
    vendor performance report
    vendor performance report
    I need standard vendor performance report
    Regards,
    Amit
    Reward all helpful replies.

  • What is an ageing report? What are the data sources used to develop an agin

    Hello BW gurus,
    I was going thru some of the BW resumes. I could not understand some of the points mentioned below. Kindly go thru them and please explain each of it.
    Thank you.
    TR.
    •     Developed AR ageing report, created invoice layout and processed invoices.
    What is an ageing report? What are the data sources used to develop an aging report
    •     Worked on month-end and year end processes such as Balance Sheet Statements and Profit and Loss Accounts. 
    What data sources does one use to get Balance sheet and P&L accounts tables and fields.
    •     Involved in the end to end implementation of BW at Reliance Group as a team member.
    What are the tasks a BW consultant normally performs when he is involved in an end to end implementation project or
    a full life cycle project?
    •     Extensively worked on BW Statistics to optimize the performance of Info Cubes and to create Aggregates.
    What do you mean when you say worked on BW statistics to optimize the performance of Info Cubes.
    What are aggregates why do you need them?
    •     Prepared design documents from the Business Requirement documents and identified the
    relevant data targets for satisfying the customer requirements.
    What are the design documents does one prepare, please give an example. 
    Is cube a data target?

    What is an ageing report? What are the data sources used to develop an aging report
    Aging refers to values in different time period ranges. Example, the customer (credit) aging report can look like this.
    customer (credit)  for current period, 0 to 30 days, 30 to 90 days, 90 to 120 days. This is the way aging is classified.
    What data sources does one use to get Balance sheet and P&L accounts tables and fields.
    For P&L information, you may use 0FI_GL_6 datasource (or 0FI_GL_10 if you use ERP 5.0 version). This datasource reads the same information used in R/3 transaction f.01 (table glt0).
    What are the tasks a BW consultant normally performs when he is involved in an end to end implementation project or a full life cycle project?
    Requirement gathering, blueprint creation, development etc
    Refer to posts on Sap Methodology  and Sap lifecyle
    What do you mean when you say worked on BW statistics to optimize the performance of Info Cubes. What are aggregates why do you need them?
    Please check these links
    http://help.sap.com/saphelp_nw04/helpdata/en/8c/131e3b9f10b904e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/f0/3c8c3bc6b84239e10000000a114084/plain.htm
    What are the design documents does one prepare, please give an example.
    Design document is basically a document to say  how the design is to be developed for a particular solution ex: FI it says what is the data fow and what are the data targets  to be used and how data shld be stored  for providing the client a solution they need.
    Is cube a data target?
    Yes cube is a data target.
    Hope this Helps
    Anand Raj

Maybe you are looking for

  • [Solved] Setting my own desktop environment

    Hi, I'm trying to setup my own desktop environment with the following packages: * slim * metacity * compton * wbar This is my slim conf: # Path, X server and arguments (if needed) # Note: -xauth $authfile is automatically appended default_path /bin:/

  • My Creative Cloud still thinks I'm on a trial and won't accept my serial number.

    I have been set up with a seat on a Creative Cloud team and downloaded/started to use all apps.  The second day in it's now saying that premiere has 29 days left of its trial period.  I have clicked through to license the software and put in my seria

  • Open items issue in fica

    Hi.. All if invoice amt is 100 $ . customer has paid 105 $ with this a cr open item  is created  with 5 $ . this cr open should adjust with next invoice. but which is not happening , i need help in this issue how to slove this problem, thx in adv sur

  • How to get the variant name from the Selection Screen

    Hi Friends,                    I have a Selection Screen with Variants.In the Report which is classical,i need to get the <b>name</b> of the variant which is used in the selection screen..Can anyone help me in this?

  • How can show the Chinese character in Oracle Report Graph on RedHat Linux?

    The OS is RedHat Linux and I set NLS="SIMPLIED CHINESE_CHINA.ZHS16GBK" in %ORA_AS_HOME%/bin/reports.sh The report file is a JSP Web Report, including Chinese character in web HTML text and graph. Now Chinese character in HTML text can be displayed co