Character streams in Java
A Stream is a path of communication between the source and destination of data. A stream is linked to a physical device by the java I/O stream Java defined two types of streams: Byte streams and character streams.
Character Stream classes
Character stream handles input and output of streams.
Character stream are defined two class hierarchies: Reader and writer(abstract classes).
Character stream has two important methods:
Read() and write().
Byte Stream classes
Byte streams handle input and output of bytes.
Byte streams are defined two class hierarchies:
Each of these abstract classes has several subclasses.
Byte stream has two important methods:
read() and write().
Byte Stream Classes
The most commonly used byte stream classes are: Input Stream and Output Stream classes. Input Stream classes are Buffered Input Stream, Byte Array Input Stream, Daa Input Stream, File Input Stream, Piped Input Sream, Object Input Stream, Sequence Input Stream, Push back Input Stream etc.
Output Stream classes are Buffer Output Stream, Byte Array Output Stream, Data Output Stream, File OutputStream, PipedOutputStream, ObjectOutputStream, PushOutputStream etc.
Exception in thread "main" java.security.AccessControlException: access denied ("java.io.FilePermission" "sorcefile.txt" "read") at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472) at java.security.AccessController.checkPermission(AccessController.java:884) at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) at java.lang.SecurityManager.checkRead(SecurityManager.java:888) at java.io.FileInputStream.
(FileInputStream.java:127) at java.io.FileInputStream. (FileInputStream.java:93) at BStream.main(BStream.java:13)