Series: IO special

Java IO special file operations


Bridging byte streams to character streams on writing-side The byte streams and character streams are incompatible for linking as the first one operates on 8-bit ASCII characters and the other on 16-bit Unicode characters. To link them explicitly, two classes exist in package, InputStreamReader and OutputStreamWriter. Towards this functionality, we have seen earlier InputStreamReader …

OutputStreamWriter Read More »

StreamTokenizer Tokenize Stream

Breaking a string or stream into meaningful independent words is known as tokenization. Tokenization is a common practice to tool developers. java.util package includes StringTokenizer which tokenizes a string into independent words. For StringTokenizer, the source is a string. There comes a similar tokenizer, StreamTokenize with package for which source is a stream. Here, …

StreamTokenizer Tokenize Stream Read More »

StringWriter vs StringBuilder

StringWriter vs StringBuilder given in simple terms for Beginner. Even though, some string word is common in both of them (like Java and JavaScript), both are very different in their functionalities. We cannot compare them because both are very different from different packages. 1. StringWriter StringWriter from package is a stream class capable to …

StringWriter vs StringBuilder Read More »