You are on page 1of 1

Bytes Streams Example

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
public class CopyBytes {
public static void main(Strin!" ars# t$ro%s IOException {
FileInputStream in & null;
FileOutputStream out & null;
try {
in & ne% FileInputStream('File(.txt)#;
out & ne% FileOutputStream('FileB.txt)#;
int c;
%$ile ((c & in.read(## *& +,# {
out.%rite(c#; - -
.inally { i. (in *& null# {
in.close(#; -
i. (out *& null# {
out.close(#; - - - -