Buffered Reader

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lenin42001
    New Member
    • Jan 2007
    • 29

    #1

    Buffered Reader

    All help gratefully recieved. What exactly is a buffered reader? We know it reads
    bytes from a zip.file but can it also read input that has been put into the terminal-window? We are using BlueJ & it is very confusing...... ......
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by lenin42001
    All help gratefully recieved. What exactly is a buffered reader? We know it reads

    bytes from a zip.file but can it also read input that has been put into the terminal-window? We are using BlueJ & it is very confusing...... ......


    Google \"BufferedReade r java\" and open the first page that is hit there.

    Comment

    • mauiboy
      New Member
      • Aug 2007
      • 8

      #3
      I'm reading lots of bytes over bluetooth and it seems that my decoding part of my code is slower than the bluetooth receiving speed.

      will buffered reader help in preventing overruns on my situation?

      how would i implement using this read statement?

      if((len = _port.read(_rec eiveBuffer, 0, length == -1 ? _receiveBuffer. length : length)) != 0)

      thanks...

      Comment

      • JosAH
        Recognized Expert MVP
        • Mar 2007
        • 11453

        #4
        A BufferedReader by itself has nothing to do with ZipInputStreams , as a matter
        of fact, the two don't like each other one bit: a ZipInputStream reads binary data
        while a Reader (such as a BufferedReader) does character translations as in
        UTF-8 etc. Perhaps you want to use a BufferedInputSt ream instead?

        kind regards,

        Jos

        Comment

        Working...