J2EEOnline
GofPatterns OOPortal
prev prev
Course navigation
Where do streams come from?
AWT and streams
The AWT is not a source of streams in Java.
Even AWT components like a TextArea, which provides large amounts of data, return their contents as strings, not streams.
One of the characteristics of a stream is that the bytes have a certain order.
Thus streams are not appropriate for components like TextAreas, where the user is allowed to change or delete text more or less at will.

Java Stream should not be used when creating a user interface.
Character Streams versus Byte Streams
Prior to JDK 1.1, the input and output classes (mostly found in the java.io package) only supported 8-bit byte streams. The concept of 16-bit Unicode character streams was introduced in JDK 1.1. While byte streams were supported via the java.io.InputStream and java.io.OutputStream classes and their subclasses, character streams are implemented by the java.io.Reader and java.io.Writer classes and their subclasses.
Course navigation