This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes what is the difference between Byte and Stream?6 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "what is the difference between Byte and Stream?6" Watch "what is the difference between Byte and Stream?6" New topic
Author

what is the difference between Byte and Stream?6

jacob deiter
Ranch Hand

Joined: Apr 02, 2008
Posts: 576
what is the difference between Byte and Stream?
Muhammad Khojaye
Ranch Hand

Joined: Apr 12, 2009
Posts: 449

jacob deiter wrote:what is the difference between Byte and Stream?

In Java, there are APIs for reading and writing streams of data. The type of data can vary from Characters to Bytes to any type.

InputStream is the superclass of all classes representing an input stream of bytes. Applications that need to define a subclass of InputStream must always provide a method that returns the next byte of input. Similarly, OutputStream is the superclass of all classes representing an output stream of bytes.

Also see Java Tutorial


http://muhammadkhojaye.blogspot.com/
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

The difference between Byte and Stream - what do you mean? Those two are two totally different things. It's like asking "What's the difference between a cup of coffee and a bicycle?".

Can you explain why you are asking this quesion, in what way are you not clear about the difference between Byte and Stream?

Byte is a wrapper class for the primitive type byte (see the API documentation of java.lang.Byte). There's no class or interface called Stream in the standard Java API. There are InputStream and OutputStream, in the package java.io. Streams are 'channels' to transport data from one place to another, for example from a file on disk to memory or vice versa.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: what is the difference between Byte and Stream?6
 
Similar Threads
Data Stream and Byte Stream
binaries and byte codes
IO streams
What is the diff. between character-stream and byte stream which one is better?why?
difference between reader and stream