Reset BufferedReader pointer back to zero

How do I reset the position of a BufferedReader object back to 0? For example, I want to do something with the BufferedReader object, namley use the read() method, and then once I do that, I would like to reset the pointer back to index 0 (or the beginning of my file).
I am using BufferedReader to open a file.
I tried using the reset() method, but that does not seem to work. I also used the skip() method, hoping to "skip" backwards, however that is not possible because you can only skip forward.
Thanks in advance!

Thanks for your help.
Yes, originally I got an IOException, that I simply caught.
Also, thanks for pointing out that the reset() method does not do what I want, meaning reset it back to the beggining of the file. So I have gotten absolutely nowhere.
Do you know how I could reset my marker back to the beginning of the file? What I actually want is to go back 9 characters in the file after I have made the call read().
Once again, thanks.

Similar Messages

  • How to reset a score for a game in the game center back to zero? and I tried deleting the game and reinstall it

    I play Subway Surfer on my other account on my iPad so a friend of mine cheated and got a very high score now I want to reset this score back to zero so is there a way to do that or I have to delete the game and create a new apple ID for my iPad

    Hi Nick,
    If you have an X Series or 2nd Generation cDAQ chassis (basically any cDAQ chassis except for the 9172 or 916x sleeves) then you can implement:
    1,2,3,4,5,6,7,8,9,10,(reset),1,2,3,4,5,6,7,8,9,10,(reset),1,2...
    You would have to configure an Edge Count Task, set the initial value to 232 - 6 (such that the 6th count causes the counter to rollover, which generates a pulse on the counter output), and enable the count reset using your external signal:
    The count reset isn't currently available for other DAQ devices, but I believe it should be available on M Series (62xx) and TIO (660x, 6624) with a future driver release (some time in 2012).
    If you don't have an X Series (or gen II cDAQ), don't despair.  On other hardware, you can get close to the previous behavior with a counter output task, with the exception that the "reset" signal would only be detected after the 2nd tick after your pulse is output.  Also, the reset signal would have to occur at the beginning to arm the counter the first time.
    Or, you can get the 3rd behavior that you asked for by doing a continuous counter output task with the external signal as the source of the timebase ticks.  For example:
    1,2,3,4,5,6,7,8,9,1,2,3,4,5,6,7,8,9
    In toggle mode (default):
    6 ticks of initial delay, 2 ticks high, 7 ticks low, 2 ticks high, 7 ticks low, ... etc.
    In pulse mode:
    6 ticks of initial delay, 9 ticks high, 9 ticks low, 9 ticks high, 9 ticks low, ... etc.
    See here for an overview of the difference of the two modes.  Basically, pulse mode will emit a short pulse when TC is reached, and toggle mode will toggle the state of the counter.  You can't have less than 2 ticks as a high time, low time, or initial delay.
    Best Regards,
    John Passiak

  • Somehow, my Referer Header got set to zero, and I'm trying to set it back to 1 or 2, but I don't know how to make it stay like that. Every time I refresh the page, it goes back to zero! Please help!

    Somehow, my Referer Header settings got set to 0 (zero). Because of this, I'm getting an error message on certain sites. I found out that I could reset it to 1 (one) or 2 (two) if I browsed to about:config and typed in the new value, but it doesn't seem to be working. I'm not sure how to "save" this setting, and ever time I refresh the about:config page the setting goes back to zero. Plus, I'm still getting the error messages on the sites I was having trouble with.

    You need to connect the iPod to your computer with iTunes and then restore the iPod via iTunes on the computer.
    Also see:
    http://www.apple.com/support/ipodtouch/getstarted/

  • Unable to reset 831 router back to default settings

    I need help with setting up my cisco 831 sdm k9 router. It was up running just fine but I ran the write-erase command to start over, little did I know that resting back to complete factory defaults did not work. The router did not go back to as if it where when I recieved it and plugged it in and followed the steps with using SDM.
    Does anyone know how to set it back up so that I can configure it?
    I have gone through the steps as listed at in the (reset to for mainline 12.3) to reset the router back to factory defaults and still no luck. All I need is to get the router reset back to how it was right out of the box so I can re-configure it.
    running: IOS 12.3(8)T7

    sho ver ressult:
    Cisco IOS Software, C831 Software (C831-K9O3Y6-M), Version 12.3(8)T7, RELEASE SO
    FTWARE (fc3)
    Technical Support: http://www.cisco.com/techsupport
    Copyright (c) 1986-2005 by Cisco Systems, Inc.
    Compiled Sat 12-Mar-05 09:03 by ccai
    ROM: System Bootstrap, Version 12.2(11r)YV3, RELEASE SOFTWARE (fc2)
    SPPDCHN-INFRA-831 uptime is 32 minutes
    System returned to ROM by power-on
    System image file is "flash:c831-k9o3y6-mz.123-8.T7.bin"
    This product contains cryptographic features and is subject to United
    States and local country laws governing import, export, transfer and
    use. Delivery of Cisco cryptographic products does not imply
    third-party authority to import, export, distribute or use encryption.
    Importers, exporters, distributors and users are responsible for
    compliance with U.S. and local country laws. By using this product you
    agree to comply with applicable laws and regulations. If you are unable
    to comply with U.S. and local laws, return this product immediately.
    A summary of U.S. laws governing Cisco cryptographic products may be found at:Cisco IOS Software, C831 Software (C831-K9O3Y6-M), Version 12.3(8)T7, RELEASE SO
    FTWARE (fc3)
    Technical Support: http://www.cisco.com/techsupport
    Copyright (c) 1986-2005 by Cisco Systems, Inc.
    Compiled Sat 12-Mar-05 09:03 by ccai
    ROM: System Bootstrap, Version 12.2(11r)YV3, RELEASE SOFTWARE (fc2)
    SPPDCHN-INFRA-831 uptime is 32 minutes
    System returned to ROM by power-on
    System image file is "flash:c831-k9o3y6-mz.123-8.T7.bin"
    This product contains cryptographic features and is subject to United
    States and local country laws governing import, export, transfer and
    use. Delivery of Cisco cryptographic products does not imply
    third-party authority to import, export, distribute or use encryption.
    Importers, exporters, distributors and users are responsible for
    compliance with U.S. and local country laws. By using this product you
    agree to comply with applicable laws and regulations. If you are unable
    to comply with U.S. and local laws, return this product immediately.
    A summary of U.S. laws governing Cisco cryptographic products may be found at:
    http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
    If you require further assistance please contact us by sending email to
    [email protected].
    Cisco C831 (MPC857DSL) processor (revision 0x500) with 58983K/6553K bytes of mem
    ory.
    Processor board ID FHK091522E8 (933743407), with hardware revision 0000
    CPU rev number 7
    2 Ethernet interfaces
    4 FastEthernet interfaces
    128K bytes of NVRAM.
    16384K bytes of processor board System flash (Read/Write)
    2048K bytes of processor board Web flash (Read/Write)
    Configuration register is 0x2102
    sho running config results:
    Current configuration : 956 bytes
    version 12.3
    no service pad
    service timestamps debug datetime msec
    service timestamps log datetime msec
    no service password-encryption
    hostname Router
    boot-start-marker
    boot-end-marker
    enable secret *****************
    enable password ****************
    no aaa new-model
    ip subnet-zero
    no ip domain lookup
    ip ips po max-events 100
    no ftp-server write-enable
    interface Ethernet0
    ip address 10.10.10.1 255.255.255.0
    interface Ethernet1
    no ip address
    shutdown
    duplex auto
    interface FastEthernet1
    no ip address
    duplex auto
    speed auto
    interface FastEthernet2
    no ip address
    duplex auto
    speed auto
    interface FastEthernet3
    no ip address
    duplex auto
    speed auto
    interface FastEthernet4
    no ip address
    duplex auto
    speed auto
    ip classless
    ip http server
    no ip http secure-server
    control-plane
    line con 0
    interface FastEthernet4
    no ip address
    duplex auto
    speed auto
    ip classless
    ip http server
    no ip http secure-server
    control-plane
    line con 0
    no modem enable
    line aux 0
    line vty 0 4
    login
    scheduler max-task-time 5000
    end

  • I have a iPhone 5.  In usage, it says i have 2.1 gigs used because of photos and camera.  I have deleted all my photos via iPhoto and now reset the phone back to factory settings in order to try to solve this problem, to no avail. Help!

    I have a iPhone 5.  In usage, it says i have 2.1 gigs used because of photos and camera.  I have deleted all my photos via iPhoto and now reset the phone back to factory settings in order to try to solve this problem, to no avail.   Both iTunes  and the phone say that 2.1 gigs are being used, even though the phone now has nothing on it.  What is going on?

    Yeah it works fine over wifi the problem is when I try to use it over my 3G. It's really stressing me out now.

  • My iphone 4s is no longer detecting wifi since the ISO8 updates came out. I've restarted, rest the networks, reset the phone back to factory settings, and even tried the freezer trick. It is STILL not detecting ANY wifi networks. HELP!!!

    My iphone 4s is no longer detecting wifi since the IOS8 updates came out. I've restarted, rest the networks, reset the phone back to factory settings, and even tried the freezer trick. It is STILL not detecting ANY wifi networks. HELP!!! I cannot afford to go over my data and I use wifi at home and work... I believe the updates have caused the issue, because it was working fine before the second update released (I hadn't put the first one one until I noticed it had stopped working, and by then the second IOS8 version had came out). They need to do a third update to fix this issue.

    If it's grayed out:
    Reset Network Settings - if that doesn't fix it, then Backup and Restore AS A NEW DEVICE.
    If it's still grayed out, unfortunately that means your Wi-Fi antenna quit, and it needs service.

  • HT4236 I had to completely reset my phone back to "new" at the Apple Store and the Genius told me that my PhotoStreams would download automatically back to my iPhone after the reset. They have not. Are they lost forever?

    I had to completely reset my phone back to "new" at the Apple Store and the Genius told me that my PhotoStreams would download automatically back to my iPhone after the reset. They have not. Are they lost forever?

    Have you logged into iCloud on the phone? If not they won't be there, also just to let you know photo stream doesn't keep your photos forever anyway. It will keep up to 1000 photo's after that it will delete the oldest photo there, it will also delete any photo that is 30 days old.

  • How to reset buffer pointer for analog output generation?

    I am doing a finite analog output generation on a USB-6216
    Sequence of events:
    DAQmx Create Task
    DAQmx Timing (finite samples, 1000Hz)
    Use DAQmx timing property SampQuantamples per channel to set buffer size
    Write buffer with DAQmx Write
    Repeat
      DAQmx Start Task
      DAQmx Wait until done
      DAQmx Stop Task
    Until finished
    DAQmx Clear Task
    I get a full waveform output on the first iteration of the loop. On subsequent iterations I get only a small section of the waveform, but no error. It seems that it is regenerating the waveform, because when I switch off regeneration I get an error at Start Task, but before it can regenerate all the data Wait Until Done.vi decides that the generation is done and exits, stopping the generation.
    I have done this with a PCI device and it works fine; every call to Start Task generates the whole waveform again.
    OK, so it looks like after every waveform generation completes I need to reset the pointer to the start of the buffer, so that the Wait Until Done vi does not think the generation is done. Or - maybe there is a way to reset the "Generation Done" state?
    I'm sure there's an easy way to do this....?

    Hi CDancer,
    Many thanks for contacting National Instruments. If I can start by giving some general advice, it would be well worth posting your actual VI. This helps others on this forum in helping you with your application. 
    From the sounds of things, you want to do continuous analog output generation. I have had a look at the examples that come with LabVIEW and I think you should look at the one below.
    I would have a look at some of the DAQmx examples that come installed with LabVIEW. The following example would be particularly relevant I feel
    Cont  Gen Voltage Wfm-Int Clk-non Regeneration.vi 
    Please let me know how you get on.
    Many thanks,
    Andrew McLennan
    Applications Engineer
    National Instruments

  • In Point Stuck Above Zero

    I've been working in a LiveType doc and I cannot get the in point to register zero. I don't have any tracks (as far as I can see) that are taking up space at the beginning -- the first track is flush left against the in point marker.
    Any suggestions regarding what might have gotten 'stuck' into place that's causing my in point to start at 54;12?
    Thanks.

    Somewhere on your hard drive is a file called livetype.plist. Should be in a Library. Spotlight will find it, may take some variations.
    Trash it.
    bogiesan

  • Best method to reset a Point

    Hello,
    This is probably a mundane question but I am wondering what is the most efficient method to reset a Point.
    1: Allocate a new Point
    myPoint = new Point();
    2: Set the point properties manually
    myPoint.x = 0;
    myPoint.y = 0;
    3: Normalize its length
    myPoint.normalize(0)
    Any thoughts??
    Pierre

    Hi,
    That is also my pick, but it is a pretty annoying thing to code for each reset. This is where a pre compiler and macro definition would be so usefull. I guess this is old school coding by today standard...who cares about performances.
    Pierre

  • Reset ASA 5510 back to MFG Settings - Please help??

    A network engineer was in the middle of setting up a customer ASA 5510 Firewall and left. We don't know the IP/UN/PW.
    Is there a way to hard reset the firewall back to manufacture settings?
    Thanks in advance.

    Hi,
    The easiest thing would be to do a password recovery, as described here:
    http://www.cisco.com/en/US/docs/security/asa/asa71/configuration/guide/trouble.html#wp1058131
    Then you can simply reset the password and carry on where he left off.
    HTH
    Andrew.

  • HT201376 Granddaughter somehow reset my computer back to the original settings, cleared everything..can it be recovered?

    Granddaughter somehow reset my computer back to the original settings, cleared everything..can it be recovered?

    Is it possible she simply created a new user account?
    Open the hard drive by double clicking its icon on the desktop (assuming you have these turned on to show). Double click the Users folder. Is there more than one account there? Is your original account still there?

  • How do I reset color profile back to original?

    I was trying to make my screen on my PowerBook G4 brighter.
    I instead made the calibration of the colors all wrong.
    How do I reset the colors back to the original settings?
    Anyone know how to make the screen brighter than what the maximum that the F2 key can do?
    I am on Tiger v. 10.4.2
    My photos, background, and every window has all the wrong colors. AHH.

    Try first this is; Make sure "show profiles for this display only is NOT checked". If it was you should now have some more choices. Maybe one will work for you.
    OPTION 2: Start wih the profile you messed up, select it and click "calibrate" CHECK he expert mode button and follow the directions. It's pretty straight forward, you don't need to be an expert to use it. Take your time and you will be able to calibrate your monitor.
    Good Luck,
    Gary

  • After IOS6 upgrade game centre says my nick name already in use. has reset some games back to beginning, how do i fix

    After IOS6 upgrade game centre says my nick name already in use. has reset some games back to beginning, how do i fix

    I've had almost every issue you've had.  Finally on Friday the screen blacked out.  It was obviously still charged, since I could hear the message ring, but when I tried to light up the display it didn't light so I was unable to get to it unless I removed the battery.  Then, as soon as the display timed out, I couldn't get it lit up again without removing battery.  I had the same slow movements throughout the display as well as slow text messaging.  Every issue you had other than the alarm clock (that always worked well).
    I took it in yesterday and, after over an hour spent there with a 'professional', I still had no answers.  He told me to come home and copy everything from my sd card to my computer, then re-format my card.  Well, my phone didn't even recognize that I had an sd card installed!!  Nor did my computer! 
    So then I got to experimenting...I removed the card and viola!!!!!!  The phone worked GREAT!  It's never worked so fast!  I then installed my husbands sd card to see if it was my phone's card reader or my card.  Turns out that the phone still worked great with his card installed and it did recognize his card in my phone.  So, my conclusion is that I need a new card.  I couldn't believe the difference in speed of everything!  It's like a brand new phone! 
    As for the hard reset...I did that over the weekend, before I could get to a verizon store.  It didn't work at all.
    I'd say, do the same thing I did and see if that works.  Can't hurt!!!  Please keep me posted.  I'd like to see what you find out 
    Good Luck!!!!

  • Battery Problem (Charging but returns back to zero percent then back to normal)

    I'm kinda frustrated about my macbook pro, I seriously want this to get fixed.  My MBP  is 2  1/2 years  Last week  My mbp shut downed by itself then I figured out that the problem was the battery so I replaced it then bought a new one. I bought a replacement battery not in the apple store but I bought it online(somewhere cheap).
    so now the big problem was after installing the new battery my mbp is charging but it returns back to zero percent then back to normal, so I can't pull out the charger from my computer because it will shut down.
    please help me.
    thanks!
    My macbook pro specs:
    Mid 2010
    Macbook pro 13 in
    Model Information:
      Serial Number:          W0********7Z2
      Manufacturer:          DP
      Device Name:          bq20z451
      Pack Lot Code:          0
      PCB Lot Code:          0
      Firmware Version:          3
      Hardware Revision:          2
      Cell Revision:          100
      Charge Information:
      Charge Remaining (mAh):          4184
      Fully Charged:          No
      Charging:          Yes
      Full Charge Capacity (mAh):          5400
      Health Information:
      Cycle Count:          2
      Condition:          Replace Now
      Battery Installed:          Yes
      Amperage (mA):          2175
      Voltage (mV):          12293
    System Power Settings:
      AC Power:
      System Sleep Timer (Minutes):          10
      Disk Sleep Timer (Minutes):          10
      Display Sleep Timer (Minutes):          10
      Wake on AC Change:          No
      Wake on Clamshell Open:          Yes
      Wake on LAN:          Yes
      Current Power Source:          Yes
      Display Sleep Uses Dim:          Yes
      PrioritizeNetworkReachabilityOverSleep:          0
      Battery Power:
      System Sleep Timer (Minutes):          63
      Disk Sleep Timer (Minutes):          10
      Display Sleep Timer (Minutes):          62
      Wake on AC Change:          No
      Wake on Clamshell Open:          Yes
      Display Sleep Uses Dim:          Yes
      Reduce Brightness:          Yes
    Hardware Configuration:
      UPS Installed:          No
    AC Charger Information:
      Connected:          Yes
      ID:          0x0100
      Wattage (W):          60
      Revision:          0x0000
      Family:          0x0085
      Serial Number:          0x00a140cc
      Charging:          Yes
    <Edited By Host>

    Your problem is the cheap battery. No need to post a serial number. I will have a moderator remove it.

Maybe you are looking for

  • Audio needs to be rendered every time

    I did a project this week which required me to change my sequence settings to PAL, 44.1KHz audio. I since changed back the sequence settings to easy setup DV NTSC, so I shouldn't have any problem with new sequences. Even so, any time I drop a QT movi

  • Tables in InDesign CS4

    Hi. I am laying out some complex tables containing event agendas. I have a series of cells that are different sizes (for example, 3 cells, first is .375" wide, second is 2" wide, third is .375" wide. I'd like to duplicate these cells and their widths

  • Advise on Actions

    Most of  clients send us huge jpgs. We resize them to 3" x 2" @ 300 dpi. (no actions used to resize because they are all different sizes & orientations) The department have an action that does the following: Convert to CMYK Save as .eps (eps files ar

  • Storing data in arrays and using Stirng methods

    Hi There! Could any one help me in developing a kind of "PhoneBook" in java? Coding for the following program is required in java(jdk1.2). The problem is to program a PhoneBook in the following way when the program executes A list of following option

  • Not printing name2 in address line

    Hello All, I dont want to print the name2 in the shipper address. Is there any option in address window? If I change Number of Lines to be Used , then shall the name2 will not get printed? Or I need to take the text window and print there? rgds, Madh