java file copy

Java File Copying

1. Semantics of File copying – FileInputStream and FileOutputStream 2. Using FileReader & FileWriter 3. Rereading a file – Using markSupported(), mark() & reset() 4. Skipping a few bytes in a file and reading 5. Reading data types using DataInputStream and DataOutputStream 6. Reading and writing sequentially and randomly – Using RandomAccessFile 7. Merging of …

Java File Copying Read More »

File Copying FileReader FileWriter

We have seen earlier, clearly the style and basics of file copying in Java, with byte streams FileInputStream and FileOutputStream in "Semantics of File Copying" and the it&339;s drawbacks of file copying in "Performance drawbacks of file copying". Now let us do the same job but with character streams – FileReader and FileWriter. The same …

File Copying FileReader FileWriter Read More »

Byte streams vs Character streams

Byte streams vs Character streams: Character streams Advantages over Byte streams Byte streams read bytes that fall under ASCII range and character streams read Unicode characters that include characters of many international languages. Being latest, introduced with JDK 1.1, the character streams are advantageous over byte streams like the inclusion of newLine() method (that is …

Byte streams vs Character streams Read More »