Streams

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ale
    New Member
    • Oct 2007
    • 11

    #1

    Streams

    what is the difference between a buffered stream and a byte array stream?
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by Ale
    what is the difference between a buffered stream and a byte array stream?
    The javadocs is a good place to search for knowledge about Java classes.

    Comment

    • JosAH
      Recognized Expert MVP
      • Mar 2007
      • 11453

      #3
      Originally posted by Ale
      what is the difference between a buffered stream and a byte array stream?
      They're two completely different beasts: a byte array stream reads bytes directly
      from an array of bytes, while a buffered stream neads another stream to read its
      bytes from. When you ask it to read one or more bytes it reads a whole chunk
      of bytes in its buffer and hands out those byte to you whenever you want to read
      more bytes; the buffered stream doesn't need to 'ask' the other stream for more
      bytes all the time, i.e. it uses its buffer for that purpose.

      kind regards,

      Jos

      Comment

      Working...