What alternative wuld there be to using StreamTokenizer?

Hello,
Currently I am using a StreamTokenizer to parse data from a file. The problem is that it goes way too slow. I'd like a faster way to process the data. If there is a better alternative to using StreamTokenizer I'd like to know. I've looked around and haven't found anything. I though using the java.nio stuff might help but now the I/O is faster in comparison to the BufferedReader, but the StreamTokenizer is keeping the I/O capabilities slow. The file sizes range from 9M - 20M and I need to find values and hold the data. I listed a very generic structure for the files I'm reading in below. I use the Headings(ex: [Values]) to sort through the data under the heading and then move on using the token.nextToken. If anyone could give me some ideas I'd appreciate it. Thank you in advance.
An Example:
[Values]
1 = "String1"
2 = "String2"
[Data Part1]
JOB_1 = 1021201212
PART_1 = 21231331
[TESTS]
T_000_= Data; Data;Data
through
T_1442 = Data; Data; Data

Currently I am using a StreamTokenizer to parsedata
from a file.Write a custom parser.
And if you parsing the same data more than once then
put the data into another format on the first parse so
it is faster on the subsequent tries.I think this would be your best bet right now. Because public static void mySimpleTokenizer()String s, String delimiter)
   String sub = null;
   int i =0;
   int j =s.indexOf(delimiter);  // First substring
   while( j >= 0) {
   sub = s.substring(i,j);
     i = j + 1;
     j = s.indexOf(delimiter, i);   // Rest of substrings
   sub = s.substring(i); // Last substring
}I read some where that the above method works almost 4 times faster than StringTokenizer, because of less overhead.
Also just wondering if the following links could be of any help
http://ostermiller.org/utils/StringTokenizer.html
http://www.javaperformancetuning.com/news/roundup032.shtml
http://www.ftponline.com/javapro/2002_08/online/servletsjsp_08_06_02/Java%20Servlets%20Ch16.pdf

Similar Messages

  • I have The last version of the MAC GT 4 desktop, don't intend to buy a new on just so I can upgrade to Firefox 4 so what alternative do I have - keep using Firefox3.6 with no support or switch to

    I have The last version of the MAC GT 4 desktop, don't intend to buy a new one just so I can upgrade to Firefox 4 - so what alternative do I have - keep using Firefox3.6 with no support or switch to another Browser?

    Firefox 4 requires at least OS X 10.5 and an Intel Mac. There is a third party version of Firefox 4 that runs on OS X 10.4/10.5 and PPC Macs, for details see http://www.floodgap.com/software/tenfourfox
    If you prefer, you can get the latest version of Firefox 3.6 from http://www.mozilla.com/en-US/firefox/all-older.html
    Firefox 3.6 is still being supported.

  • The command line 'route' command is broken - what alternatives are there?

    The 'route' command appears to be broken in Mavericks ( now also in 10.9.4 ). It does update that tables, so netstat -r makes it seem that it has worked. However, browsers, pings and trace routes all give errors such as 'out of memory'.
    So, what can I do to set up working alternatives to the standard routing?
    There certainly is some routing capability, and the ability to change it - if you use the OS/X server and set up a VPN, you can set up routing there. So it should be possible to access it through the command line somehow.
    Any suggestions gratefully received.
    I really thought that this would be easy, but it's turned into quite a headache.

    This isn't a great fix but it's helped us out. We created an autoit script to edit the firefox.js file found in program files\mozilla firefox\default\pref. It searches for the line "pref("app.update.auto", true);" and changes it to "pref("app.update.auto", false);". It's a pain but it's the best we could come up with.
    Note: We updated to 3.6.14 and even with the setting above FF still did an auto update to 3.6.15.

  • What alternative CMS are there to Business Catalyst which work with Muse?

    Hi there,
    We built a new site in Muse and started using BC (for the CMS) over a year ago, and while we're very pleased with how the site now looks and performs, we feel we've outgrown BC/the CMS.
    What alternatives do we have for the CMS that will work with Muse?
    If it helps...
    - We'd like a better search facility that can look at individual categories as we have several content holders such as News, Jobs, Features articles etc
    - A page numbering system rather than a long list of items stored in the content holder (news items etc). IE at the bottom you see 1, 2, 3, 4, etc
    - Tags - so key phrases or categories are suggested/shown with a value of news items
    Any help much appreciated
    Regards
    Tom

    Hi Tom,
    Just showing my support to your question. I have found Catalyst a NON-2015 CMS, and I would really like to hear we have more options for managing our Muse made websites.
    Any answer from the Adobe team?
    Diego

  • What is an alternative download for microsoftt word using a mac bookair?

    what is an alternative download for microsoftt word using a mac bookair?

    Office 2004 and Other Applications Don't Work in Lion/Mountain Lion
    If you have Office 2004 which is a PPC-only suite, it will not work in Lion/Mountain Lion. You need to upgrade to Office 2011 - Mactopia - or you can try the freeware suite, Libre Office, that is functionally similar to Office 2007 for Windows except it works on Lion/Mountain Lion.
    You may want to consider as well:
    These two suites are similar to Libre Office but not as current or as well-supported:
    NeoOffice
    Open Office
    And, then there is Apple's iWork suite:
    Pages - word processing and layout
    Keynote - presentation
    Numbers - spreadsheet
    Each can open and save Office compatible files. They may be purchased separately via the Mac App Store for $19.99 each.
    As for other software, any PPC-based software will not run in Lion or Mountain Lion because Rosetta is no longer part of OS X. You will need to upgrade to Intel versions of the software.
    (Access to the Mac App Store requires Snow Leopard 10.6.6 or higher and an Apple ID.)

  • I am a new mac user and I switch to mac due to the graphics that it brings. I do website in pc and I heard iweb is the best.NOW i heard that iweb will be discontinue. so what is the best application there for website using MAC OSX lion?

    I am a new mac user and I switch to mac due to the graphics that it brings. I do website in pc and I heard iweb is the best.NOW i heard that iweb will be discontinue. so what is the best application there for website using MAC OSX lion?

    It is now confirmed  that iWeb, and iDVD, has been discontinued by Apple. This is evidenced by the fact that new Macs are shipping with iLife 11 installed but without iWeb and iDVD.
    On June 30, 2012 MobileMe will be shutdown. However, iWeb will still continue to work but without the following:
    Features No Longer Available Once MobileMe is Discontinued:
    ◼ Password protection
    ◼ Blog and photo comments
    ◼ Blog search
    ◼ Hit counter
    ◼ MobileMe Gallery
    All of these features can be replaced with 3rd party options.
    I found that if I published my site to a folder on my hard drive and then uploaded with a 3rd party FTP client subscriptions to slideshows and the RSS feed were broken.  If I published directly from iWeb to the FPT server those two features continued to work correctly.
    There's another problem and that's with iWeb's popup slideshows.  Once the MMe servers are no longer online the popup slideshow buttons will not display their images.
    Click to view full size
    However, Roddy McKay and I have figured out a way to modify existing sites with those slideshows and iWeb itself so that those images will display as expected once MobileMe servers are gone.  How to is described in this tutorial: #26 - How to Modify iWeb So Popup Slideshows Will Work After MobileMe is Discontinued.
    It now appears that the iLife suite of applications offered on disc is now a discontinued product and the remaining supported iApps will only be available thru the App Store from now on. However, the iLife 11 boxed version that is still available at the online Apple Store (Store button at the top of the page) and those still on the shelves of retailers will include iWeb and iDVD. Those two apps were listed in small, gray text on the iLife 11 box that I bought.
    Personally, if I didn't already have a copy I would purchase one to have it for reinstallation purposes if ever needed.
    This might be of some interest to you at this time: Life After MobileMe.
    OT

  • I have an apple tv 1st generation, and there is a setting for airtunes. can someone tell me what this is and how to use it?

    I have an apple tv 1st generation, and there is a setting for airtunes. can someone tell me what this is and how to use it?

    I've looked at that, but on my PC, "look for remote speakers connected with airtunes" isn't an option.
    The only options I get are "prevent ipods [etc] from syncing automatically" , "warn me when [X %] of the data on this computer will be changed" and "forget all remotes". Its also got a list of backups I have saved, as well as a button to reset sync history.
    When I am playing a song, the "airplay" button isn't even visible.
    I am sure that the apple tv setting is on as well. Is there anything else you can help me with?

  • By what time zone does Verizon use to log data usage?  When I checked my current usage, there is data used logged in at early morning times and I don't have anyone else who is up at these times.

    By what time zone does Verizon use to log data usage?  When I checked my current usage, there is data used logged in at early morning times and I don't have anyone else who is up at these times.  I also have 1.8+ GB charged to my allowance that I don't understand at all how it is mine because the highest I've ever logged at any given time has been barely 0.5 GB.  I'm cruising along at .04-.07 GB and all of a sudden appears a 1.8+ GB deduction/usage and it makes me wonder what the ???? is going on.  Is Verizon posting fraudulent usage amounts just to drive up my usage so I have to buy more Gigs?

    The time is not the time of actual use, but the time a tower reports the use. The data would have been used anytime prior to that time. Usually, but no always, the usage happened between the time prior and the time reported.
    For example:
    9:00 AM   1.23 MB
    7:05 AM   0.01 MB
    1:15 AM  350.03 MB
    8:00 PM   23.89 MB
    This does not indicate 350 MB was used at 1:15 AM. It really tell you 350 MB was used sometime between 8:00 PM and 1:15 AM.
    The times are local time zone as far as I can tell.

  • May i know what kind of leather used in making the iphone 5s casing?is there any possibility using pig skin?

    Subject:
    May i know what kind of leather used in making the iphone 5s casing?is there any possibility using pig skin?

    Actually, Apple does make an iPhone 5s case in leather, but they do not indicate what species the leather is from.
    http://store.apple.com/us/product/MF041LL/A/iphone-5s-case-brown?fnode=47
    There are number of other companies that make leather iPhone cases though - I've used numerous Sena leather sleeves and cases over the years although I've never inquired what species of leather they use.

  • HT4623 hi sir/madam i have a problem with my icloud acount.my brpther has bought a iphone 4 from europa.since 2 years i was using my phone.i have made hard reset and now i can not activate my phone.denn i do not know the icloud acoud what i see there.

    hi sir/madam i have a problem with my icloud acount.my brpther has bought a iphone 4 from europa.since 2 years i was using my phone.i have made hard reset and now i can not activate my phone.denn i do not know the icloud acoud what i see there.pilease help me about that problem...

    You need to use the credentials for the iCloud account that was used to turn on the Find my iPhone service.
    If you can't remember yours, you can recover it here: https://iforgot.apple.com/appleid
    If you've been walking around for 2 years with someone else's account set up for Find my iphone, then you'll have to get hold of that individual. If you can't, there is no way to bypass activation lock.

  • What solutions are there for Adobe Cloud subscribers/designers who are using/have been using Adobe s

    What solutions are there for Adobe Cloud subscribers/designers who are using/have been using Adobe software but have run into system requirement inadequacies etc. . . Basically, I have a new mac and CS6 runs fine. But my old macbook can only run CS5.5. Because I'm a subscriber my Adobe CS5.5  updated automatically. What happens when one day a year or two from now (or sooner) my MAC won't support the latest version of my CS subscription? Is there a way for cloud subscribers to subscribe to a legacy or an older version of CS?

    Hi Wildeboer420,
    Its my understanding that previous versions will still be acessible for users going forward, I copied the following from the FAQ
    I am a Creative Cloud member using the CS6 applications included in my membership. Will I lose access to CS6 when CS7 becomes available in Creative Cloud?
    No, if you have downloaded and installed the CS6 versions of the applications, you will continue to have access to them without interruption as long as your membership remains active. When the CS7 versions become available, you will have up to a year to download and install them and they will run on your machine along with CS6 versions.
    Hope that helps,
    -Dave

  • After July 2015 when FormsCentral is discontinued what software or alternative will there be?

    After July 2015 when FormsCentral is discontinued what software or alternative will there be?

    Hello Nancy,
    Since the announcement we have helped thousands of FormsCentral users migrate to JotForm successfully. They are extremely happy with the solution we provide. We  have a near perfect import tool that can import your web forms, form responses and PDF forms. It takes only seconds to request an import and we handle the rest for you.
    http://www.jotform.com/adobe-formscentral-alternative/
    On the page above, in addition to the import tool, we have a comparision tour. You can compare all of the features of FormsCentral to JotForm.
    If you have any questions please let me know.

  • What is the best format to use on an external hard drive so I can both back up my Macbook Pro and also put movies on it from another hard drive (PC)?

    I am looking for a solution to whether if it is best to get two hard drives or one that can do two things that I want.
    I am looking for a hard drive format that can both back up my 500GB Macbook Pro but I was also wondering if I could also put movies on it from another hard drive that is PC based. Would partitioning the hard drive work for this? I don't know what are the best formats to use.
    If this is too hard it might just be easier having a separate 500GB hard drive for back up of my Mac and another bigger hard drive for the movies etc (the files are probably bigger than 4GB). Any help would be greatly appreciated as I need to make a decision soon!

    Csound1 wrote:
    Microsoft has not released the official exFAT file system specification, and a restrictive license from Microsoft is required in order to make and distribute exFAT implementations. Microsoft also asserts patents on exFAT which make it impossible to re-implement its functionality in a compatible way without violating a large percentage of them.[13] This renders the implementation, distribution, and use of exFAT as a part of free or open-source operating systems or of commercial software, for which the vendors could not obtain a license from Microsoft, not only technically difficult, but legally impossible in countries that recognize United States software patents.
    Can't help with that, if one is using a Windows machine then they are subjected to their rules and control.
    Limited support outside Windows and Mac OS X operating systems as of 2012, when most consumer electronic devices could only handleFAT12/FAT16/FAT32, rendering exFAT (and flash memory formats using it) impractical as a universal exchange format.
    The OP said they plan to store movies on the external drive.
    Many movies today are well over 4GB in size, thus exFAT has to be used and formatted on the PC, which the Mac can then read.
    Older Windows NT versions up to Windows Vista without Service Pack 1 do not support exFAT.
    Irrelevant, Microsoft provides a free download of exFAT for Windows XP, and Vista shouldn't be running on pre SP1 anyway.
    Some distributions of Linux have begun to include support for exFAT. It is however, only available as a file system in user space, as it's not supported by the kernel.
    Irrelevant, OP is using Windows and OS X, not Linux and if they did Linux can read the files at least and transfer, which is all they care about really.
    Windows Vista is unable to use exFAT drives for ReadyBoost. Windows 7 removes this limitation, enabling ReadyBoost caches larger than 4 GiB.[14]
    Irrelevant, the OP's is intending to use it as transfer drive between Mac's and Windows for movies.
    The standard exFAT implementation only uses a single file allocation table and free space map. FAT file systems instead used alternating tables, as this allowed recovery of the file system if the media was ejected during a write (which occurs frequently in practice with removable media). The optional TexFAT component adds support for additional backup tables and maps, but may not be supported.
    Some relevancy, but only exFAT can handle 4GB+ files between Mac's and PC's, so the need outweighs the possible problem.
    The OP needs to follow the standard Windows practice of "safely removing hardware" before physically disconnecting the external drive. If a write is occurring, it won't allow disconnecting until the write is finished.
    Support for up to 2,796,202 files per subdirectory only.[1][nb 3] Microsoft documents a limit of 65,534 files per sub-directory for their FAT32 implementation, but other operating systems have no special limit for the number of files in a FAT32 directory. FAT32 implementations in other operating systems allow an unlimited number of files up to the number of available clusters (that is, up to 268,304,373 files on volumes without long filenames).[nb 4]
    Not a issue, only in extreme cases of a lot of small files. The OP plans to use it for movies which are usually large and take up a lot of space on the drive.
    IMMO It looks like you just ran off and copied something to argue your point when all the points are basically irrelevant.
    There is only one format that can easily share 4GB sized files between Mac's and PC's without further complications.
    It's ALSO possible to install MacDrive on the PC and format the drive on the Mac HFS+, but I didn't recommend that because I know it's a hassle just like third party NTFS writing software is a hassle on Mac's.
    If you so anti-Microsoft format, then you must know Paragon has to pay a license fee to Microsoft for using the NTFS format.
    At least with exFAT there is no fee to Redmond, at least not yet.

  • What you tube app should I use on my ipad2?

    What you tube app should I use on my ipad2?

    Google's official Youtube App is the recommended one.
    https://itunes.apple.com/en/app/youtube/id544007664?mt=8
    But there are many othe rApps yu can use, it depends on what functionality you want.
    Just search the store for the many alternatives.

  • Since i updated my iphone to ios7, i can no longer download applications and also cannot update my apps. what happened? there is an alert popping and it tells that i should switch to Philippine store.

    since i updated my iphone to ios7, i can no longer download applications and also cannot update my apps. what happened? there is an alert popping and it tells that i should switch to Philippine store.

    Hi, sallymaesmag. 
    Thank you for visiting Apple Support Communities.
    If you are in the Philippines, check to see if the country is changed in the iTunes Store settings on the iOS device.  These steps will show you how to change the preference.
    Change your iTunes Store country
    Sign in to the account for the iTunes Store region you'd like to use. TapSettings > iTunes & App Stores > Apple ID: > View Apple ID > Country/Region.
    Follow the onscreen process to change your region, agree to the terms and conditions for the region if necessary, and then change your billing information.
    iOS: Changing the signed-in iTunes Store Apple ID account
    http://support.apple.com/kb/HT1311
    Once you make the change attempt to download applications again.
    Jason H.

Maybe you are looking for

  • Mini- DVI to VGA adapter Or is that, DVI to DVI?

    I am having difficulty figuring out which adapter to purchase if I want to use my MacBook to make a Keynote or PowerPoint Presentation with an LCD projector. Do I need the Mini- DVI to VGA adapter, or is it DVI to Video adapter, or DVI to DVI adapter

  • PL/SQL code not working

    why is this code giving me error? declare type dept_tab_type is table of departments%rowtype; index by binary_integer; dept_tab dept_tab_type; v_counter number(3):= 270; begin for i in 10..v_count loop select * into dept_tab(i) from departments end l

  • Can't delete or move messages unless I quit and restart

    Beginning yesterday I was unable to delete or move any messages in any of my 4 accounts. If I closed Tbird than restarted it I could delete and move messages in all accounts for 10 or 15 minutes. Thereafter delete again mysteriously failed to work. I

  • Page stops scrolling unexpectedly; clicking on link or relaunch needed

    When browsing a page, I am able to scroll freely for a time, then the page freezes, and I am unable to scroll up or down, independent of the method (keyboard, scroll bar, internal or external touchpad...) Clicking on a link to go to another page, or

  • UCCX 7.0 Problem with Holiday Dates

    Hi there, I appreciate there is already a thread with same issue in Enterprise but i was told scripting is different in Expresss so I have opened a fresh thread. On our May holiday the Contact centre opened up on the Monday as normal,. I have attache