copy a given binary file

implements io package of java api to copy bit by bit